playbook_ui 15.5.0.pre.rc.3 → 15.5.0.pre.rc.4
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_advanced_table/docs/_advanced_table_column_styling.jsx +2 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_infinite_scroll.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_editing.jsx +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.jsx +2 -1
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +1 -1
- data/app/pb_kits/playbook/pb_copy_button/copy_button.html.erb +6 -2
- data/app/pb_kits/playbook/pb_copy_button/copy_button.rb +3 -0
- data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +24 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant.html.erb +9 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/{_copy_button_icon_variant.jsx → _copy_button_button_variant.jsx} +4 -4
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant_rails.md +1 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_button_variant_react.md +1 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +2 -2
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +1 -2
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +2 -2
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +2 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_copy_button/docs/index.js +1 -1
- data/app/pb_kits/playbook/pb_dropdown/index.js +31 -13
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_alignment.jsx +2 -1
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_default.jsx +2 -1
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_orientation.jsx +2 -1
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_size.jsx +2 -1
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_wrapped.jsx +4 -1
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_variant.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_horizontal.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_non_clickable.jsx +1 -2
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_negative_numbers.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_secondary_y_axis.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.jsx +1 -2
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_stacked.jsx +1 -2
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_block_content.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_color_overrides.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_legend_position.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_labels.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_data_with_legend.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_inner_sizes.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_live_data.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_rounded.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_with_title.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.jsx +1 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_full_circle.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_height.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.jsx +2 -1
- data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.jsx +1 -1
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.jsx +4 -1
- data/app/pb_kits/playbook/pb_radio/docs/_radio_react_hook.jsx +3 -1
- data/app/pb_kits/playbook/pb_select/docs/_select_react_hook.jsx +3 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_sizing.jsx +4 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.jsx +2 -1
- data/app/pb_kits/playbook/pb_user/docs/_user_font_options.jsx +1 -1
- data/dist/chunks/_typeahead-Cd3O38ts.js +6 -0
- data/dist/chunks/lib-CgpqUb6l.js +29 -0
- data/dist/chunks/vendor.js +37 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +8 -11
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_icon_variant_react.md +0 -1
- data/dist/chunks/_line_graph-Co6PvNPL.js +0 -1
- data/dist/chunks/_typeahead-D0OX5RuZ.js +0 -6
- data/dist/chunks/_weekday_stacked-HzVLtvcd.js +0 -37
- data/dist/chunks/componentRegistry-DzmmLR2x.js +0 -1
- data/dist/chunks/lib-COXg9aPA.js +0 -29
- data/dist/chunks/pb_form_validation-DR765aoq.js +0 -1
- data/dist/playbook-doc.js +0 -19
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 334e531aefb16fff6a6b9405de7a7d2882190b10e318a429fddd3db0efe5e393
|
|
4
|
+
data.tar.gz: f8e7dede555ff290830f962dc6f42b1eccdbe69ce71cb26f5687bef18aaf882b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e8372ee5464a1993ec758aa5dc633be3c00b0b1b57185827e4325227053fa7bbf093814a5bff43956f7466ab6f31e03772e82e4723109a35369ab3c840be0372
|
|
7
|
+
data.tar.gz: a62f5d3abde3f18cb8e4df32959d4d5cdeab6adb1294e4f8c482bebf65bf93173da832c1769ef803f9cc77b7145dac1d2e92dc33b6fb826a9e560d6008d760bb
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { useState } from "react"
|
|
2
|
-
import
|
|
2
|
+
import AdvancedTable from '../_advanced_table'
|
|
3
|
+
import Flex from '../../pb_flex/_flex'
|
|
4
|
+
import Button from '../../pb_button/_button'
|
|
3
5
|
import MOCK_DATA from "./advanced_table_mock_data.json"
|
|
4
6
|
import PAGINATION_MOCK_DATA from "./advanced_table_pagination_mock_data.json"
|
|
5
7
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import
|
|
2
|
+
import AdvancedTable from '../../pb_advanced_table/_advanced_table'
|
|
3
|
+
import TextInput from '../../pb_text_input/_text_input'
|
|
4
|
+
import Body from '../../pb_body/_body'
|
|
3
5
|
import MOCK_DATA from "./advanced_table_mock_data.json";
|
|
4
6
|
|
|
5
7
|
const AdvancedTableInlineEditing = (props) => {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import AdvancedTable from '../_advanced_table'
|
|
3
3
|
import MOCK_DATA from "./advanced_table_mock_data_with_id.json"
|
|
4
|
-
import
|
|
4
|
+
import colors from '../../tokens/exports/_colors.module.scss'
|
|
5
|
+
|
|
5
6
|
|
|
6
7
|
const AdvancedTableRowStyling = (props) => {
|
|
7
8
|
const columnDefinitions = [
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<%= pb_content_tag do %>
|
|
2
|
-
|
|
3
|
-
<%=
|
|
2
|
+
<% if object.variant == "icon" %>
|
|
3
|
+
<%= pb_rails("circle_icon_button", props: { icon: "copy", variant: "link" }) %>
|
|
4
|
+
<% else %>
|
|
5
|
+
<%= pb_rails("button", props: { icon: "copy" }) do %>
|
|
6
|
+
<%= object.text %>
|
|
7
|
+
<% end %>
|
|
4
8
|
<% end %>
|
|
5
9
|
<% if object.id %>
|
|
6
10
|
<%= pb_rails("tooltip", props: {
|
|
@@ -37,6 +37,29 @@ it('copies the value to clipboard and pastes it into an input', async () => {
|
|
|
37
37
|
expect(navigator.clipboard.writeText).toHaveBeenCalledWith("copy");
|
|
38
38
|
})
|
|
39
39
|
|
|
40
|
+
test('passes text and tooltip props to icon variant', () => {
|
|
41
|
+
render(
|
|
42
|
+
<CopyButton
|
|
43
|
+
data={{ testid: 'text-test' }}
|
|
44
|
+
tooltipPlacement="right"
|
|
45
|
+
tooltipText="Text copied!"
|
|
46
|
+
value="copy"
|
|
47
|
+
/>
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
const kit = screen.getByTestId('text-test')
|
|
51
|
+
const button = kit.querySelector('.pb_button_kit.pb_button_link.pb_button_inline.pb_button_enabled')
|
|
52
|
+
expect(button).toBeInTheDocument()
|
|
53
|
+
|
|
54
|
+
fireEvent.click(button)
|
|
55
|
+
const tooltipContent = screen.getByText("Text copied!")
|
|
56
|
+
expect(tooltipContent).toHaveTextContent("Text copied!")
|
|
57
|
+
|
|
58
|
+
const tooltip = kit.querySelector('.pb_tooltip_kit')
|
|
59
|
+
expect(tooltip).toBeInTheDocument()
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
|
|
40
63
|
test('passes text and tooltip props to button', () => {
|
|
41
64
|
render(
|
|
42
65
|
<CopyButton
|
|
@@ -45,6 +68,7 @@ test('passes text and tooltip props to button', () => {
|
|
|
45
68
|
tooltipPlacement="right"
|
|
46
69
|
tooltipText="Text copied!"
|
|
47
70
|
value="copy"
|
|
71
|
+
variant="button"
|
|
48
72
|
/>
|
|
49
73
|
)
|
|
50
74
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<%= pb_rails("copy_button", props: {
|
|
2
|
+
text: "Copy Text",
|
|
3
|
+
tooltip_position: "right",
|
|
4
|
+
tooltip_text: "Text copied!",
|
|
5
|
+
value: "Playbook makes it easy to support bleeding edge, or legacy systems. Use Playbook's 200+ components and end-to-end design language to create simple, intuitive and beautiful experiences with ease.",
|
|
6
|
+
variant: "button",
|
|
7
|
+
}) %>
|
|
8
|
+
|
|
9
|
+
<%= pb_rails("textarea", props: { margin_top: "xs", placeholder: "Copy and paste here" }) %>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
-
import CopyButton from '
|
|
3
|
+
import CopyButton from '../_copy_button'
|
|
4
4
|
import Textarea from '../../pb_textarea/_textarea'
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const CopyButtonVariant = (props) => (
|
|
7
7
|
<div>
|
|
8
8
|
<CopyButton
|
|
9
9
|
{...props}
|
|
@@ -11,7 +11,7 @@ const CopyIconVariant = (props) => (
|
|
|
11
11
|
tooltipPlacement="right"
|
|
12
12
|
tooltipText="Text copied!"
|
|
13
13
|
value="Playbook makes it easy to support bleeding edge, or legacy systems. Use Playbook’s 200+ components and end-to-end design language to create simple, intuitive and beautiful experiences with ease."
|
|
14
|
-
variant="
|
|
14
|
+
variant="button"
|
|
15
15
|
/>
|
|
16
16
|
|
|
17
17
|
<Textarea
|
|
@@ -21,4 +21,4 @@ const CopyIconVariant = (props) => (
|
|
|
21
21
|
</div>
|
|
22
22
|
)
|
|
23
23
|
|
|
24
|
-
export default
|
|
24
|
+
export default CopyButtonVariant
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Pass in `variant: "button"` to replace the Circle Icon Button with the Button kit. Set the button's text with the `text` prop.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Pass in `variant="button"` to replace the Circle Icon Button with the Button kit. Set the button's text with the `text` prop.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<%= pb_rails("copy_button", props: { id: "default-copy-button",
|
|
2
|
-
<%= pb_rails("textarea", props: { margin_top: "xs", placeholder: "
|
|
1
|
+
<%= pb_rails("copy_button", props: { id: "default-copy-button", value: "Playbook makes it easy to support bleeding edge, or legacy systems. Use Playbook’s 200+ components and end-to-end design language to create simple, intuitive and beautiful experiences with ease." } ) %>
|
|
2
|
+
<%= pb_rails("textarea", props: { margin_top: "xs", placeholder: "Click the icon above to copy and paste here" }) %>
|
|
@@ -7,7 +7,6 @@ const CopyButtonDefault = (props) => (
|
|
|
7
7
|
<div>
|
|
8
8
|
<CopyButton
|
|
9
9
|
{...props}
|
|
10
|
-
text="Copy Text"
|
|
11
10
|
tooltipPlacement="right"
|
|
12
11
|
tooltipText="Text copied!"
|
|
13
12
|
value="Playbook makes it easy to support bleeding edge, or legacy systems. Use Playbook’s 200+ components and end-to-end design language to create simple, intuitive and beautiful experiences with ease."
|
|
@@ -15,7 +14,7 @@ const CopyButtonDefault = (props) => (
|
|
|
15
14
|
|
|
16
15
|
<Textarea
|
|
17
16
|
{...props}
|
|
18
|
-
placeholder="
|
|
17
|
+
placeholder="Click the icon above to copy and paste here"
|
|
19
18
|
/>
|
|
20
19
|
</div>
|
|
21
20
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%= pb_rails("body", props: { id: "body", text: "Copy this body text!"}) %>
|
|
2
|
-
<%= pb_rails("copy_button", props: { text: "Copy Body text", from: "body", id: "copy-body-button" }) %>
|
|
2
|
+
<%= pb_rails("copy_button", props: { text: "Copy Body text", from: "body", id: "copy-body-button", variant: "button" }) %>
|
|
3
3
|
<%= pb_rails("text_input", props: { margin_top: "xs", placeholder: "Copy and paste here" }) %>
|
|
4
|
-
<%= pb_rails("copy_button", props: { text: "Copy Text Input", from: "copy-input", id: "copy-input-button" }) %>
|
|
4
|
+
<%= pb_rails("copy_button", props: { text: "Copy Text Input", from: "copy-input", id: "copy-input-button", variant: "button" }) %>
|
|
5
5
|
<%= pb_rails("text_input", props: { margin_top: "xs", id: "copy-input" , value: "Copy and paste here" }) %>
|
|
@@ -21,6 +21,7 @@ const CopyButtonFrom = (props) => {
|
|
|
21
21
|
text="Copy Body text"
|
|
22
22
|
tooltipPlacement="right"
|
|
23
23
|
tooltipText="Body text copied!"
|
|
24
|
+
variant="button"
|
|
24
25
|
/>
|
|
25
26
|
|
|
26
27
|
<TextInput
|
|
@@ -36,6 +37,7 @@ const CopyButtonFrom = (props) => {
|
|
|
36
37
|
text="Copy Text Input"
|
|
37
38
|
tooltipPlacement="right"
|
|
38
39
|
tooltipText="Text input copied!"
|
|
40
|
+
variant="button"
|
|
39
41
|
/>
|
|
40
42
|
|
|
41
43
|
<Textarea
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
examples:
|
|
2
2
|
rails:
|
|
3
3
|
- copy_button_default: Default
|
|
4
|
+
- copy_button_button_variant: Button Variant
|
|
4
5
|
- copy_button_from: Copy From
|
|
5
6
|
- copy_button_hook_rails: Copy Hook
|
|
6
7
|
|
|
7
8
|
react:
|
|
8
9
|
- copy_button_default: Default
|
|
10
|
+
- copy_button_button_variant: Button Variant
|
|
9
11
|
- copy_button_from: Copy From
|
|
10
12
|
- copy_button_hook: Copy Hook
|
|
11
|
-
- copy_button_icon_variant: Icon Variant
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as CopyButtonDefault } from './_copy_button_default.jsx'
|
|
2
2
|
export { default as CopyButtonFrom } from './_copy_button_from.jsx'
|
|
3
3
|
export { default as CopyButtonHook } from './_copy_button_hook.jsx'
|
|
4
|
-
export { default as
|
|
4
|
+
export { default as CopyButtonButtonVariant } from './_copy_button_button_variant.jsx'
|
|
@@ -33,6 +33,8 @@ export default class PbDropdown extends PbEnhancedElement {
|
|
|
33
33
|
this.formPillProps = this.element.dataset.formPillProps
|
|
34
34
|
? JSON.parse(this.element.dataset.formPillProps)
|
|
35
35
|
: {};
|
|
36
|
+
const baseInput = this.element.querySelector(DROPDOWN_INPUT);
|
|
37
|
+
this.wasOriginallyRequired = baseInput && baseInput.hasAttribute("required");
|
|
36
38
|
this.setDefaultValue();
|
|
37
39
|
this.bindEventListeners();
|
|
38
40
|
this.bindSearchInput();
|
|
@@ -356,17 +358,6 @@ export default class PbDropdown extends PbEnhancedElement {
|
|
|
356
358
|
}
|
|
357
359
|
|
|
358
360
|
clearFormValidation(input) {
|
|
359
|
-
if (input.checkValidity()) {
|
|
360
|
-
const dropdownWrapperElement = input.closest(".dropdown_wrapper");
|
|
361
|
-
dropdownWrapperElement.classList.remove("error");
|
|
362
|
-
|
|
363
|
-
const errorLabelElement = dropdownWrapperElement.querySelector(
|
|
364
|
-
".pb_body_kit_negative"
|
|
365
|
-
);
|
|
366
|
-
if (errorLabelElement) {
|
|
367
|
-
errorLabelElement.remove();
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
361
|
if (this.isMultiSelect) {
|
|
371
362
|
if (this.selectedOptions.size > 0) {
|
|
372
363
|
const dropdownWrapperElement = input.closest(".dropdown_wrapper");
|
|
@@ -377,6 +368,19 @@ export default class PbDropdown extends PbEnhancedElement {
|
|
|
377
368
|
if (errorLabelElement) {
|
|
378
369
|
errorLabelElement.remove();
|
|
379
370
|
}
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
if (input.checkValidity()) {
|
|
376
|
+
const dropdownWrapperElement = input.closest(".dropdown_wrapper");
|
|
377
|
+
dropdownWrapperElement.classList.remove("error");
|
|
378
|
+
|
|
379
|
+
const errorLabelElement = dropdownWrapperElement.querySelector(
|
|
380
|
+
".pb_body_kit_negative"
|
|
381
|
+
);
|
|
382
|
+
if (errorLabelElement) {
|
|
383
|
+
errorLabelElement.remove();
|
|
380
384
|
}
|
|
381
385
|
}
|
|
382
386
|
}
|
|
@@ -585,7 +589,9 @@ export default class PbDropdown extends PbEnhancedElement {
|
|
|
585
589
|
// for multi_select, for each selectedOption, create a hidden input
|
|
586
590
|
const name = baseInput.getAttribute("name");
|
|
587
591
|
this.selectedOptions.forEach((raw) => {
|
|
588
|
-
const
|
|
592
|
+
const optionData = JSON.parse(raw);
|
|
593
|
+
// Use id if available, otherwise fall back to value
|
|
594
|
+
const id = optionData.id || optionData.value;
|
|
589
595
|
const inp = document.createElement("input");
|
|
590
596
|
inp.type = "hidden";
|
|
591
597
|
inp.name = name;
|
|
@@ -593,7 +599,19 @@ export default class PbDropdown extends PbEnhancedElement {
|
|
|
593
599
|
inp.dataset.generated = "true";
|
|
594
600
|
baseInput.insertAdjacentElement("afterend", inp);
|
|
595
601
|
});
|
|
596
|
-
|
|
602
|
+
|
|
603
|
+
// For multi-select, remove required from base input when there are selections
|
|
604
|
+
// The generated inputs handle the form submission with actual values
|
|
605
|
+
// Restore required attribute when there are no selections (if it was originally required)
|
|
606
|
+
if (this.selectedOptions.size > 0) {
|
|
607
|
+
baseInput.value = "";
|
|
608
|
+
baseInput.removeAttribute("required");
|
|
609
|
+
} else {
|
|
610
|
+
baseInput.value = "";
|
|
611
|
+
if (this.wasOriginallyRequired) {
|
|
612
|
+
baseInput.setAttribute("required", "");
|
|
613
|
+
}
|
|
614
|
+
}
|
|
597
615
|
}
|
|
598
616
|
|
|
599
617
|
handleBackspaceClear() {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import
|
|
2
|
+
import Card from '../../pb_card/_card'
|
|
3
|
+
import Caption from '../../pb_caption/_caption'
|
|
4
|
+
import FormPill from '../_form_pill'
|
|
5
|
+
import Typeahead from '../../pb_typeahead/_typeahead'
|
|
3
6
|
|
|
4
7
|
const names = [
|
|
5
8
|
{ label: 'Alexander Nathaniel Montgomery', value: 'Alexander Nathaniel Montgomery' },
|
|
@@ -7,7 +7,8 @@ import Caption from '../../pb_caption/_caption'
|
|
|
7
7
|
import Body from '../../pb_body/_body'
|
|
8
8
|
import SectionSeparator from '../../pb_section_separator/_section_separator'
|
|
9
9
|
import Title from '../../pb_title/_title'
|
|
10
|
-
import
|
|
10
|
+
import colors from '../../tokens/exports/_colors.module.scss'
|
|
11
|
+
import typography from '../../tokens/exports/_typography.module.scss'
|
|
11
12
|
|
|
12
13
|
const data = [{ name: "Name", y: 10 }];
|
|
13
14
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PbGaugeChart from '../../pb_pb_gauge_chart/_pb_gauge_chart'
|
|
3
|
-
import
|
|
3
|
+
import colors from '../../tokens/exports/_colors.module.scss'
|
|
4
|
+
import typography from '../../tokens/exports/_typography.module.scss'
|
|
4
5
|
|
|
5
6
|
const data = [{ name: "Capacity", y: 75 }]
|
|
6
7
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PbGaugeChart from '../../pb_pb_gauge_chart/_pb_gauge_chart'
|
|
3
|
-
import
|
|
3
|
+
import colors from '../../tokens/exports/_colors.module.scss'
|
|
4
|
+
import typography from '../../tokens/exports/_typography.module.scss'
|
|
4
5
|
|
|
5
6
|
const chartOptions = {
|
|
6
7
|
title: {
|