playbook_ui 14.17.0.pre.alpha.play1735highchartscirclechartdefaultrebuild7372 → 14.17.0.pre.alpha.play1906overlaykitaddopacityandgradient7201
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/Components/RegularTableView.tsx +3 -23
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +3 -67
- data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableActions.ts +2 -1
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/ExpansionControlHelpers.tsx +19 -29
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +128 -67
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +0 -9
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +2 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +2 -6
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +2 -6
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -5
- data/app/pb_kits/playbook/pb_advanced_table/index.js +0 -7
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +1 -1
- data/app/pb_kits/playbook/pb_background/_background.scss +0 -26
- data/app/pb_kits/playbook/pb_background/_background.tsx +3 -5
- data/app/pb_kits/playbook/pb_background/background.test.js +0 -5
- data/app/pb_kits/playbook/pb_background/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_background/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/circleChart.test.js +2 -2
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.html.erb +2 -2
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +2 -2
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +3 -2
- data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +45 -19
- data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_copy_button/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_dialog/dialog.html.erb +1 -10
- data/app/pb_kits/playbook/pb_dialog/dialog.rb +0 -2
- data/app/pb_kits/playbook/pb_dialog/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_dialog/index.js +14 -106
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +1 -1
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +3 -23
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +5 -15
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +6 -39
- data/app/pb_kits/playbook/pb_gauge/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_gauge/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_layout/_layout.scss +1 -70
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +2 -29
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +118 -322
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +1 -1
- data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +43 -74
- data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +4 -21
- data/app/pb_kits/playbook/pb_overlay/_overlay.scss +0 -34
- data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +4 -25
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +9 -1
- data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -5
- data/app/pb_kits/playbook/pb_overlay/docs/index.js +0 -5
- data/app/pb_kits/playbook/pb_table/_table.tsx +2 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.md +1 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.md +1 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md +1 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md +1 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +1 -1
- data/app/pb_kits/playbook/pb_table/table.rb +1 -13
- data/app/pb_kits/playbook/pb_table/table_header.rb +1 -13
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +5 -13
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_text_input/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_text_input/inputMask.ts +1 -8
- data/dist/chunks/_typeahead-HqfDnjRe.js +22 -0
- data/dist/chunks/_weekday_stacked--YupDiur.js +45 -0
- data/dist/chunks/lib-BGzBzFZX.js +29 -0
- data/dist/chunks/{pb_form_validation-CFPfX89U.js → pb_form_validation-BvNy9Bd6.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +1 -1
- data/dist/playbook-doc.js +1 -19
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +6 -49
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expand_by_depth.jsx +0 -66
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expand_by_depth.md +0 -10
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.jsx +0 -58
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.md +0 -6
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.jsx +0 -64
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.md +0 -8
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.jsx +0 -55
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.md +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.html.erb +0 -33
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.md +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/scss_partials/advanced_table_sticky_mixin.scss +0 -97
- data/app/pb_kits/playbook/pb_background/docs/_background_overlay.jsx +0 -35
- data/app/pb_kits/playbook/pb_background/docs/_background_overlay.md +0 -1
- data/app/pb_kits/playbook/pb_circle_chart/circleChartTheme.ts +0 -53
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.jsx +0 -38
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.md +0 -1
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.jsx +0 -54
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.md +0 -3
- data/app/pb_kits/playbook/pb_copy_button/usePBCopy.ts +0 -45
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_turbo_frames.html.erb +0 -117
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_turbo_frames_rails.md +0 -9
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.html.erb +0 -42
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.md +0 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.jsx +0 -30
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.md +0 -1
- data/app/pb_kits/playbook/pb_gauge/gaugeTheme.ts +0 -85
- data/app/pb_kits/playbook/pb_layout/subcomponents/_participant.tsx +0 -79
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.jsx +0 -63
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.md +0 -3
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_background.jsx +0 -49
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_background.md +0 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_opacity.jsx +0 -81
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_opacity.md +0 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.jsx +0 -39
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.md +0 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.jsx +0 -40
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +0 -5
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.html.erb +0 -34
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_rails.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.html.erb +0 -36
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_rails.md +0 -1
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_sanitize.jsx +0 -94
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_sanitize.md +0 -1
- data/dist/chunks/_typeahead-Cut4TNua.js +0 -22
- data/dist/chunks/_weekday_stacked-DzDjhKiS.js +0 -45
- data/dist/chunks/lib-yWHJ_8mm.js +0 -29
@@ -10,81 +10,6 @@ export default class PbDialog extends PbEnhancedElement {
|
|
10
10
|
connect() {
|
11
11
|
window.addEventListener("DOMContentLoaded", () => this.setupDialog())
|
12
12
|
window.addEventListener("turbo:frame-load", () => this.setupDialog())
|
13
|
-
|
14
|
-
// Code for custom_event_type setup (can take multiple events in a string separated by commas)
|
15
|
-
const customEventTypeString = this.element.dataset.customEventType
|
16
|
-
if (customEventTypeString && !this.element.hasAttribute("data-custom-event-handled")) {
|
17
|
-
this.customEventTypes = customEventTypeString.split(",").map(e => e.trim()).filter(Boolean)
|
18
|
-
this.customEventTypes.forEach(eventType => {
|
19
|
-
window.addEventListener(eventType, this.handleCustomEvent)
|
20
|
-
})
|
21
|
-
|
22
|
-
this.element.setAttribute("data-custom-event-handled", "true")
|
23
|
-
}
|
24
|
-
}
|
25
|
-
|
26
|
-
disconnect() {
|
27
|
-
if (this.customEventTypes && Array.isArray(this.customEventTypes)) {
|
28
|
-
this.customEventTypes.forEach(eventType => {
|
29
|
-
window.removeEventListener(eventType, this.handleCustomEvent)
|
30
|
-
})
|
31
|
-
}
|
32
|
-
}
|
33
|
-
|
34
|
-
handleCustomEvent = (event) => {
|
35
|
-
const dialogId = event.detail?.dialogId || this.element.querySelector("dialog")?.id
|
36
|
-
const dialog = dialogId && document.getElementById(dialogId)
|
37
|
-
|
38
|
-
if (!dialog) {
|
39
|
-
console.warn(`[PbDialog] Could not find dialog with ID '${dialogId}'`)
|
40
|
-
return
|
41
|
-
}
|
42
|
-
|
43
|
-
this.setupDialog()
|
44
|
-
|
45
|
-
const action = event.detail?.action || 'open'
|
46
|
-
|
47
|
-
// Known Actions - four "standard" dialog actions that felt like things devs might want to do
|
48
|
-
const knownActions = ['open', 'close', 'clickConfirm', 'clickCancel'];
|
49
|
-
|
50
|
-
if (knownActions.includes(action)) {
|
51
|
-
switch (action) {
|
52
|
-
case 'open':
|
53
|
-
if (!dialog.open) dialog.showModal()
|
54
|
-
break
|
55
|
-
case 'close':
|
56
|
-
if (dialog.open) dialog.close(event.detail?.returnValue)
|
57
|
-
break
|
58
|
-
case 'clickConfirm':
|
59
|
-
this.triggerButtonClick(dialog, event, 'confirm')
|
60
|
-
break
|
61
|
-
case 'clickCancel':
|
62
|
-
this.triggerButtonClick(dialog, event, 'cancel')
|
63
|
-
break
|
64
|
-
}
|
65
|
-
}
|
66
|
-
// Custom Actions - flexible for Turbo or other integration
|
67
|
-
else if (typeof event.detail?.customAction === 'function') {
|
68
|
-
event.detail.customAction({ dialog, event })
|
69
|
-
} else if (window.pbDialogActions?.[action]) {
|
70
|
-
// Can register custom actions globally
|
71
|
-
window.pbDialogActions[action]({ dialog, event })
|
72
|
-
} else {
|
73
|
-
console.warn(`[PbDialog] Unknown action: ${action}`)
|
74
|
-
}
|
75
|
-
}
|
76
|
-
|
77
|
-
triggerButtonClick(dialog, event, type) {
|
78
|
-
const buttonId = event.detail?.[`${type}ButtonId`] ||
|
79
|
-
dialog.closest('[data-pb-dialog-wrapper]')?.dataset[`${type}ButtonId`]
|
80
|
-
const button = buttonId ? document.getElementById(buttonId) :
|
81
|
-
dialog.querySelector(`[data-${type}-button]`)
|
82
|
-
|
83
|
-
if (button) {
|
84
|
-
button.click()
|
85
|
-
} else {
|
86
|
-
console.warn(`[PbDialog] Could not find ${type} button for dialog`)
|
87
|
-
}
|
88
13
|
}
|
89
14
|
|
90
15
|
setupDialog() {
|
@@ -93,7 +18,7 @@ export default class PbDialog extends PbEnhancedElement {
|
|
93
18
|
const dialogs = document.querySelectorAll(".pb_dialog_rails")
|
94
19
|
|
95
20
|
const loadingButton = document.querySelector('[data-disable-with="Loading"]');
|
96
|
-
if (loadingButton
|
21
|
+
if (loadingButton) {
|
97
22
|
loadingButton.addEventListener("click", function () {
|
98
23
|
const okayLoadingButton = document.querySelector('[data-disable-with="Loading"]');
|
99
24
|
const cancelButton = document.querySelector('[data-disable-cancel-with="Loading"]');
|
@@ -110,42 +35,27 @@ export default class PbDialog extends PbEnhancedElement {
|
|
110
35
|
okayLoadingButton.className = newClass;
|
111
36
|
if (cancelButton) cancelButton.className = newCancelClass;
|
112
37
|
});
|
113
|
-
|
114
|
-
// Prevent multiple registrations
|
115
|
-
loadingButton.dataset.listenerAttached = "true";
|
116
38
|
}
|
117
|
-
|
118
|
-
openTrigger.forEach((open) => {
|
119
|
-
const originalClickHandler = open._openDialogClickHandler
|
120
|
-
if (originalClickHandler) open.removeEventListener("click", originalClickHandler)
|
121
|
-
|
122
|
-
open._openDialogClickHandler = () => {
|
123
|
-
const openTriggerData = open.dataset.openDialog;
|
124
|
-
const targetDialogOpen = document.getElementById(openTriggerData)
|
125
|
-
if (targetDialogOpen && !targetDialogOpen.open) targetDialogOpen.showModal()
|
126
|
-
};
|
127
39
|
|
128
|
-
|
40
|
+
openTrigger.forEach((open) => {
|
41
|
+
open.addEventListener("click", () => {
|
42
|
+
var openTriggerData = open.dataset.openDialog;
|
43
|
+
var targetDialog = document.getElementById(openTriggerData)
|
44
|
+
if (targetDialog.open) return;
|
45
|
+
targetDialog.showModal();
|
46
|
+
});
|
129
47
|
});
|
130
48
|
|
131
49
|
closeTrigger.forEach((close) => {
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
const closeTriggerData = close.dataset.closeDialog;
|
137
|
-
const targetDialogClose = document.getElementById(closeTriggerData)
|
138
|
-
if (targetDialogClose) targetDialogClose.close();
|
139
|
-
};
|
140
|
-
|
141
|
-
close.addEventListener("click", close._closeDialogClickHandler)
|
50
|
+
close.addEventListener("click", () => {
|
51
|
+
var closeTriggerData = close.dataset.closeDialog;
|
52
|
+
document.getElementById(closeTriggerData).close();
|
53
|
+
});
|
142
54
|
});
|
143
55
|
|
144
56
|
// Close dialog box on outside click
|
145
57
|
dialogs.forEach((dialogElement) => {
|
146
|
-
|
147
|
-
if (originalMousedownHandler) dialogElement.removeEventListener("mousedown", originalMousedownHandler)
|
148
|
-
dialogElement._outsideClickHandler = (event) => {
|
58
|
+
dialogElement.addEventListener("mousedown", (event) => {
|
149
59
|
const dialogParentDataset = dialogElement.parentElement.dataset
|
150
60
|
if (dialogParentDataset.overlayClick === "overlay_close") return
|
151
61
|
|
@@ -159,9 +69,7 @@ export default class PbDialog extends PbEnhancedElement {
|
|
159
69
|
dialogElement.close()
|
160
70
|
event.stopPropagation()
|
161
71
|
}
|
162
|
-
}
|
163
|
-
|
164
|
-
dialogElement.addEventListener("mousedown", dialogElement._outsideClickHandler);
|
72
|
+
})
|
165
73
|
})
|
166
74
|
}
|
167
75
|
}
|
@@ -22,7 +22,7 @@ type DropdownOptionProps = {
|
|
22
22
|
data?: { [key: string]: string };
|
23
23
|
htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
|
24
24
|
id?: string;
|
25
|
-
key?: string
|
25
|
+
key?: string;
|
26
26
|
option?: GenericObject;
|
27
27
|
padding?: string;
|
28
28
|
} & GlobalProps;
|
@@ -85,19 +85,11 @@
|
|
85
85
|
.text_input_wrapper input, [class^=pb_text_input_kit] .text_input_wrapper .text_input {
|
86
86
|
border-bottom-right-radius: 0;
|
87
87
|
border-top-right-radius: 0;
|
88
|
-
border-right-
|
88
|
+
border-right-width: 0;
|
89
89
|
}
|
90
|
-
[class^=pb_text_input_kit] .text_input_wrapper input:focus,
|
91
|
-
[class^=pb_text_input_kit] .text_input_wrapper .text_input:focus {
|
92
|
-
border-right-color: $primary;
|
93
|
-
}
|
94
|
-
[class^=pb_text_input_kit].error .text_input_wrapper input,
|
95
|
-
[class^=pb_text_input_kit].error .text_input_wrapper .text_input {
|
96
|
-
border-right-color: $error;
|
97
|
-
}
|
98
90
|
}
|
99
91
|
|
100
|
-
& > [class^=pb_phone_number_input]:not(:first-child)
|
92
|
+
& > [class^=pb_phone_number_input]:not(:first-child) {
|
101
93
|
.text_input_wrapper input, [class^=pb_text_input_kit] .text_input_wrapper .text_input {
|
102
94
|
border-bottom-left-radius: 0;
|
103
95
|
border-top-left-radius: 0;
|
@@ -115,16 +107,8 @@
|
|
115
107
|
.text_input {
|
116
108
|
border-bottom-right-radius: 0;
|
117
109
|
border-top-right-radius: 0;
|
118
|
-
border-right
|
110
|
+
border-right: none;
|
119
111
|
}
|
120
|
-
[class^=pb_text_input_kit] .text_input_wrapper input:focus,
|
121
|
-
[class^=pb_text_input_kit] .text_input_wrapper .text_input:focus {
|
122
|
-
border-right-color: $primary;
|
123
|
-
}
|
124
|
-
[class^=pb_text_input_kit].error .text_input_wrapper input,
|
125
|
-
[class^=pb_text_input_kit].error .text_input_wrapper .text_input {
|
126
|
-
border-right-color: $error;
|
127
|
-
}
|
128
112
|
}
|
129
113
|
|
130
114
|
&[class*=rails] > [class^=pb_date_picker_kit] {
|
@@ -243,8 +227,4 @@
|
|
243
227
|
padding-left: calc(var(--iti-flag-width) + 1px);
|
244
228
|
}
|
245
229
|
}
|
246
|
-
|
247
|
-
&:has(> [class^="pb_select"]):has(> .pb_passphrase) [class^="pb_select"] {
|
248
|
-
align-self: baseline;
|
249
|
-
}
|
250
230
|
}
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
<div>
|
2
|
+
|
2
3
|
<%= pb_rails("form_group") do %>
|
3
4
|
<%= pb_rails("text_input", props: { placeholder: "Enter Artist Name" }) %>
|
4
5
|
<%= pb_rails("select", props: {
|
@@ -16,6 +17,8 @@
|
|
16
17
|
]
|
17
18
|
}) %>
|
18
19
|
<% end %>
|
20
|
+
<br>
|
21
|
+
<br>
|
19
22
|
<%= pb_rails("form_group") do %>
|
20
23
|
<%= pb_rails("select", props: {
|
21
24
|
blank_selection: "Phone",
|
@@ -29,17 +32,4 @@
|
|
29
32
|
id: "phone"
|
30
33
|
}) %>
|
31
34
|
<% end %>
|
32
|
-
|
33
|
-
<%= pb_rails("phone_number_input", props: {
|
34
|
-
id: "phone2"
|
35
|
-
}) %>
|
36
|
-
<%= pb_rails("select", props: {
|
37
|
-
blank_selection: "Phone",
|
38
|
-
options: [
|
39
|
-
{ value: "Cell" },
|
40
|
-
{ value: "Work" },
|
41
|
-
{ value: "Home" },
|
42
|
-
]
|
43
|
-
}) %>
|
44
|
-
<% end %>
|
45
|
-
<% end %>
|
35
|
+
</div>
|
@@ -1,16 +1,11 @@
|
|
1
|
-
import React
|
1
|
+
import React from 'react'
|
2
2
|
|
3
3
|
import FormGroup from '../_form_group'
|
4
4
|
import PhoneNumberInput from '../../pb_phone_number_input/_phone_number_input'
|
5
5
|
import Select from '../../pb_select/_select'
|
6
6
|
import TextInput from '../../pb_text_input/_text_input'
|
7
|
-
import Flex from '../../pb_flex/_flex'
|
8
|
-
import Passphrase from '../../pb_passphrase/_passphrase'
|
9
7
|
|
10
8
|
const FormGroupSelect = (props) => {
|
11
|
-
const [input, setInput] = useState("");
|
12
|
-
const handleChange = (e) => setInput(e.target.value);
|
13
|
-
|
14
9
|
const options = [
|
15
10
|
{ value: 'Country' },
|
16
11
|
{ value: 'Pop' },
|
@@ -30,10 +25,7 @@ const FormGroupSelect = (props) => {
|
|
30
25
|
]
|
31
26
|
|
32
27
|
return (
|
33
|
-
<
|
34
|
-
orientation="column"
|
35
|
-
rowGap="md"
|
36
|
-
>
|
28
|
+
<div>
|
37
29
|
<FormGroup>
|
38
30
|
<TextInput
|
39
31
|
placeholder="Enter Artist Name"
|
@@ -45,43 +37,18 @@ const FormGroupSelect = (props) => {
|
|
45
37
|
{...props}
|
46
38
|
/>
|
47
39
|
</FormGroup>
|
40
|
+
<br />
|
41
|
+
<br />
|
48
42
|
<FormGroup>
|
49
43
|
<Select
|
50
44
|
blankSelection="Phone"
|
51
45
|
options={phoneOptions}
|
52
|
-
|
53
|
-
/>
|
46
|
+
/>
|
54
47
|
<PhoneNumberInput
|
55
48
|
id='default'
|
56
|
-
{...props}
|
57
49
|
/>
|
58
50
|
</FormGroup>
|
59
|
-
|
60
|
-
<PhoneNumberInput
|
61
|
-
id='default-2'
|
62
|
-
{...props}
|
63
|
-
/>
|
64
|
-
<Select
|
65
|
-
blankSelection="Phone"
|
66
|
-
options={phoneOptions}
|
67
|
-
{...props}
|
68
|
-
/>
|
69
|
-
</FormGroup>
|
70
|
-
<FormGroup>
|
71
|
-
<Select
|
72
|
-
blankSelection="Phone"
|
73
|
-
options={phoneOptions}
|
74
|
-
{...props}
|
75
|
-
/>
|
76
|
-
<Passphrase
|
77
|
-
id="my-passphrase"
|
78
|
-
label=""
|
79
|
-
onChange={handleChange}
|
80
|
-
value={input}
|
81
|
-
{...props}
|
82
|
-
/>
|
83
|
-
</FormGroup>
|
84
|
-
</Flex>
|
51
|
+
</div>
|
85
52
|
)
|
86
53
|
}
|
87
54
|
|
@@ -1,5 +1,4 @@
|
|
1
1
|
export { default as GaugeDefault } from './_gauge_default.jsx'
|
2
|
-
export { default as GaugePbStyles } from './_gauge_pb_styles.jsx'
|
3
2
|
export { default as GaugeDisableAnimation } from './_gauge_disable_animation.jsx'
|
4
3
|
export { default as GaugeFullCircle } from './_gauge_full_circle.jsx'
|
5
4
|
export { default as GaugeHeight } from './_gauge_height.jsx'
|
@@ -210,78 +210,10 @@ $bracket-border-width: 4px;
|
|
210
210
|
border-right: $bracket-border-width solid $border_light;
|
211
211
|
}
|
212
212
|
|
213
|
-
.polygon_node {
|
214
|
-
position: absolute;
|
215
|
-
top: calc(50% - 5px);
|
216
|
-
right: -10px;
|
217
|
-
|
218
|
-
width: 0;
|
219
|
-
height: 0;
|
220
|
-
border-top: 5px solid transparent;
|
221
|
-
border-bottom: 5px solid transparent;
|
222
|
-
border-left: 10px solid $border_light;
|
223
|
-
}
|
224
|
-
|
225
213
|
.layout_round_label {
|
226
214
|
display: none;
|
227
215
|
}
|
228
216
|
|
229
|
-
.layout_participant,
|
230
|
-
.layout_participant_winner,
|
231
|
-
.layout_participant_self,
|
232
|
-
.layout_participant_winner_self,
|
233
|
-
.layout_participant_winner_self_last {
|
234
|
-
height: 60px;
|
235
|
-
}
|
236
|
-
|
237
|
-
.layout_tbd {
|
238
|
-
height: 140px;
|
239
|
-
display: flex;
|
240
|
-
flex-direction: column;
|
241
|
-
justify-content: center;
|
242
|
-
}
|
243
|
-
|
244
|
-
.layout_participant_winner,
|
245
|
-
.layout_participant_self,
|
246
|
-
.layout_participant_winner_self,
|
247
|
-
.layout_participant_winner_self_last {
|
248
|
-
position: relative;
|
249
|
-
|
250
|
-
&::after {
|
251
|
-
content: "";
|
252
|
-
position: absolute;
|
253
|
-
top: 0;
|
254
|
-
width: 4px;
|
255
|
-
height: 100%;
|
256
|
-
}
|
257
|
-
}
|
258
|
-
|
259
|
-
.layout_participant_winner::after {
|
260
|
-
right: 0;
|
261
|
-
background: $product_6_highlight;
|
262
|
-
}
|
263
|
-
|
264
|
-
.layout_participant_self::after {
|
265
|
-
left: 0;
|
266
|
-
background: $category_1;
|
267
|
-
}
|
268
|
-
|
269
|
-
.layout_participant_winner_self::after {
|
270
|
-
right: 0;
|
271
|
-
background: $product_6_highlight;
|
272
|
-
}
|
273
|
-
|
274
|
-
.layout_participant_winner_self_last::after {
|
275
|
-
left: 0;
|
276
|
-
background: $category_1;
|
277
|
-
}
|
278
|
-
|
279
|
-
.game_separator {
|
280
|
-
&::before, &::after {
|
281
|
-
height: 2px;
|
282
|
-
}
|
283
|
-
}
|
284
|
-
|
285
217
|
@media (max-width: $screen-md-max) {
|
286
218
|
flex-direction: column;
|
287
219
|
.layout_round_label {
|
@@ -289,8 +221,7 @@ $bracket-border-width: 4px;
|
|
289
221
|
}
|
290
222
|
.layout_round .layout_game::after,
|
291
223
|
.connector_container,
|
292
|
-
.half_box
|
293
|
-
.polygon_node {
|
224
|
+
.half_box {
|
294
225
|
display: none !important;
|
295
226
|
}
|
296
227
|
}
|
@@ -6,7 +6,6 @@ import { GlobalProps, globalProps, globalInlineProps } from '../utilities/global
|
|
6
6
|
|
7
7
|
import { Round, RoundLabel } from "./subcomponents/_round";
|
8
8
|
import Game from "./subcomponents/_game";
|
9
|
-
import Participant from "./subcomponents/_participant";
|
10
9
|
|
11
10
|
type LayoutPropTypes = {
|
12
11
|
aria?: {[key: string]: string},
|
@@ -177,38 +176,13 @@ const Layout = (props: LayoutPropTypes) => {
|
|
177
176
|
(child: React.ReactElement & {type: {displayName: string}}) => child.type?.displayName !== 'Side'
|
178
177
|
)
|
179
178
|
|
180
|
-
const numberOfRounds = Array.isArray(
|
179
|
+
const numberOfRounds = Array.isArray(nonSideChildren) ? React.Children.toArray(children).filter(
|
181
180
|
(child) => {
|
182
181
|
return (child as React.ReactElement).type === Layout.Round;
|
183
182
|
}
|
184
183
|
).length : 0
|
185
|
-
|
186
|
-
const lastRoundWithSelf = React.Children.toArray(children).filter((child) => {
|
187
|
-
if ((child as React.ReactElement).type !== Layout.Round) {
|
188
|
-
return false
|
189
|
-
}
|
190
|
-
|
191
|
-
const roundElement = child as React.ReactElement
|
192
|
-
|
193
|
-
const gameChildren = React.Children.toArray(roundElement.props.children)
|
194
|
-
|
195
|
-
const hasWinningSelfParticipant = gameChildren.some((gameChild) => {
|
196
|
-
const gameElement = gameChild as React.ReactElement
|
197
|
-
|
198
|
-
const participantChildren = React.Children.toArray(gameElement.props.children)
|
199
|
-
|
200
|
-
return participantChildren.some((participantChild) => {
|
201
|
-
const participantElement = participantChild as React.ReactElement
|
202
|
-
const { self } = participantElement.props
|
203
|
-
return self === true
|
204
|
-
})
|
205
|
-
})
|
206
|
-
|
207
|
-
return hasWinningSelfParticipant
|
208
|
-
}).length
|
209
|
-
|
210
184
|
const bracketChildren = nonSideChildren.map(child =>
|
211
|
-
React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds
|
185
|
+
React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds }) : child
|
212
186
|
)
|
213
187
|
|
214
188
|
const filteredProps = {...props}
|
@@ -245,6 +219,5 @@ Layout.Footer = Footer
|
|
245
219
|
Layout.Round = Round
|
246
220
|
Layout.Game = Game
|
247
221
|
Layout.RoundLabel = RoundLabel
|
248
|
-
Layout.Participant = Participant
|
249
222
|
|
250
223
|
export default Layout
|