playbook_ui_docs 16.9.0 → 16.10.0.pre.rc.1
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/docs/_date_picker_year_asc.html.erb +1 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_year_asc.jsx +15 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_year_asc.md +1 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_playground.json +1 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_filter/docs/_filter_interactive.html.erb +116 -0
- data/app/pb_kits/playbook/pb_filter/docs/_filter_interactive.md +12 -0
- data/app/pb_kits/playbook/pb_filter/docs/_filter_interactive_react.jsx +153 -0
- data/app/pb_kits/playbook/pb_filter/docs/_filter_interactive_react.md +10 -0
- data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.html.erb +1 -1
- data/app/pb_kits/playbook/pb_filter/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_filter/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_with_required_indicator.html.erb +20 -19
- data/app/pb_kits/playbook/pb_icon/docs/_icon_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_color.html.erb +21 -0
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_color.jsx +55 -0
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_color.md +1 -0
- data/app/pb_kits/playbook/pb_loading_inline/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_loading_inline/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_popover/docs/_popover_list.jsx +9 -11
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_playground.json +4 -1
- metadata +12 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4267f7b437b78af8734c0b08b776a4d8c14c8676bb558bc73ed30890c305d3cc
|
|
4
|
+
data.tar.gz: c565734d3238c9f404ebcff2fa4b159b03aef1b97089c613aa607df543421b28
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0ef9f525463816195a2f3e5ed4ff7d9b684341829979557a99664ee1879fcb65d1da6166003da9758ca64232004a9173c5beb86510e7e09eda31168498d4387
|
|
7
|
+
data.tar.gz: 72079f297c3b342c8a5b34137f6b65a0cb8ff2a82452ccc433664415ca5d83ee93f4d75c59436ff037c85be3da8907c572c0f459345cce8602759c213f597f71
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<%= pb_rails("date_picker", props: { picker_id: "date-picker-date-asc", year_ascending: true}) %>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
import DatePicker from '../_date_picker'
|
|
4
|
+
|
|
5
|
+
const DatePickerYearAsc = (props) => (
|
|
6
|
+
<div>
|
|
7
|
+
<DatePicker
|
|
8
|
+
pickerId="date-picker-date-asc"
|
|
9
|
+
yearAscending
|
|
10
|
+
{...props}
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
export default DatePickerYearAsc
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
`yearAscending`/`year_ascending` is a boolean prop that if set to true, will render the years in the year dropdown in chronological order. This prop is set to false by default.
|
|
@@ -23,6 +23,7 @@ examples:
|
|
|
23
23
|
- date_picker_flatpickr_methods: Flatpickr Methods
|
|
24
24
|
- date_picker_hooks: Hooks
|
|
25
25
|
- date_picker_year_range: Year Range
|
|
26
|
+
- date_picker_year_asc: Year Ascending
|
|
26
27
|
- date_picker_anti_patterns: Anti-Patterns
|
|
27
28
|
- date_picker_margin_bottom: Margin Bottom
|
|
28
29
|
- date_picker_inline: Inline
|
|
@@ -58,6 +59,7 @@ examples:
|
|
|
58
59
|
- date_picker_flatpickr_methods: Flatpickr Methods
|
|
59
60
|
- date_picker_hooks: Hooks
|
|
60
61
|
- date_picker_year_range: Year Range
|
|
62
|
+
- date_picker_year_asc: Year Ascending
|
|
61
63
|
- date_picker_margin_bottom: Margin Bottom
|
|
62
64
|
- date_picker_inline: Inline
|
|
63
65
|
- date_picker_month_and_year: Month & Year Only
|
|
@@ -30,3 +30,4 @@ export { default as DatePickerRangePattern } from './_date_picker_range_pattern'
|
|
|
30
30
|
export { default as DatePickerAndDropdownRange } from './_date_picker_and_dropdown_range.jsx'
|
|
31
31
|
export { default as DatePickerRequiredIndicator } from "./_date_picker_required_indicator.jsx";
|
|
32
32
|
export { default as DatePickerDialogSubmission } from "./_date_picker_dialog_submission.jsx";
|
|
33
|
+
export { default as DatePickerYearAsc } from './_date_picker_year_asc.jsx'
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<%
|
|
2
|
+
territory_options = [
|
|
3
|
+
{ value: "USA", label: "USA" },
|
|
4
|
+
{ value: "Canada", label: "Canada" },
|
|
5
|
+
{ value: "Brazil", label: "Brazil" },
|
|
6
|
+
{ value: "Philippines", label: "Philippines" },
|
|
7
|
+
]
|
|
8
|
+
|
|
9
|
+
status_options = [
|
|
10
|
+
{ value: "open", label: "Open", id: "open" },
|
|
11
|
+
{ value: "in_progress", label: "In progress", id: "in_progress" },
|
|
12
|
+
{ value: "resolved", label: "Resolved", id: "resolved" },
|
|
13
|
+
{ value: "closed", label: "Closed", id: "closed" },
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
raw_example = params[:example]
|
|
17
|
+
example_params =
|
|
18
|
+
if raw_example.respond_to?(:permit)
|
|
19
|
+
raw_example.permit(:territory, :status, :date_range, :start_date)
|
|
20
|
+
else
|
|
21
|
+
raw_example || {}
|
|
22
|
+
end
|
|
23
|
+
current_territory = example_params[:territory].presence || "USA"
|
|
24
|
+
current_status = example_params[:status].presence || "open"
|
|
25
|
+
current_date_range = example_params[:date_range].presence || "quickpick-this-week"
|
|
26
|
+
current_start = example_params[:start_date].presence || "05/01/2026"
|
|
27
|
+
status_default = status_options.find { |o| o[:value] == current_status }
|
|
28
|
+
%>
|
|
29
|
+
|
|
30
|
+
<%=
|
|
31
|
+
pb_rails("filter", props: {
|
|
32
|
+
id: "filter-interactive-demo",
|
|
33
|
+
min_width: "360px",
|
|
34
|
+
margin_bottom: "xl",
|
|
35
|
+
template: "default",
|
|
36
|
+
results: 546,
|
|
37
|
+
filters: [
|
|
38
|
+
{ name: "Territory", value: current_territory },
|
|
39
|
+
{ name: "Status", value: current_status },
|
|
40
|
+
{ name: "Date range", value: current_date_range },
|
|
41
|
+
{ name: "Start date", value: current_start },
|
|
42
|
+
],
|
|
43
|
+
interactive_filters: [
|
|
44
|
+
{
|
|
45
|
+
name: "Territory",
|
|
46
|
+
type: "select",
|
|
47
|
+
options: territory_options,
|
|
48
|
+
target_input: "filter-interactive-territory",
|
|
49
|
+
auto_submit: true,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "Status",
|
|
53
|
+
type: "dropdown",
|
|
54
|
+
options: status_options,
|
|
55
|
+
target_input: "filter-interactive-status",
|
|
56
|
+
auto_submit: true,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "Date range",
|
|
60
|
+
type: "dropdown",
|
|
61
|
+
variant: "quickpick",
|
|
62
|
+
target_input: "filter-interactive-date-range",
|
|
63
|
+
auto_submit: true,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "Start date",
|
|
67
|
+
type: "date-picker",
|
|
68
|
+
target_input: "filter-interactive-start",
|
|
69
|
+
format: "m/d/Y",
|
|
70
|
+
auto_submit: true,
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
sort_menu: [
|
|
74
|
+
{ item: "Popularity", link: "?q[sorts]=managers_popularity+asc", active: true, direction: "desc" },
|
|
75
|
+
],
|
|
76
|
+
}) do
|
|
77
|
+
%>
|
|
78
|
+
<%= pb_rails("form", props: { form_system_options: { scope: :example, method: :get } }) do |form| %>
|
|
79
|
+
<%= pb_rails("select", props: {
|
|
80
|
+
label: "Territory",
|
|
81
|
+
name: "territory",
|
|
82
|
+
options: territory_options.map { |o| { value: o[:value], text: o[:label] } },
|
|
83
|
+
value: current_territory,
|
|
84
|
+
input_options: { id: "filter-interactive-territory" }
|
|
85
|
+
}) %>
|
|
86
|
+
|
|
87
|
+
<%= pb_rails("dropdown", props: {
|
|
88
|
+
id: "filter-interactive-status",
|
|
89
|
+
label: "Status",
|
|
90
|
+
name: "status",
|
|
91
|
+
options: status_options,
|
|
92
|
+
default_value: status_default,
|
|
93
|
+
margin_bottom: "sm",
|
|
94
|
+
}) %>
|
|
95
|
+
|
|
96
|
+
<%= pb_rails("dropdown", props: {
|
|
97
|
+
id: "filter-interactive-date-range",
|
|
98
|
+
label: "Date range",
|
|
99
|
+
name: "date_range",
|
|
100
|
+
variant: "quickpick",
|
|
101
|
+
margin_bottom: "sm",
|
|
102
|
+
}) %>
|
|
103
|
+
|
|
104
|
+
<%= pb_rails("date_picker", props: {
|
|
105
|
+
label: "Start date",
|
|
106
|
+
name: "start_date",
|
|
107
|
+
picker_id: "filter-interactive-start",
|
|
108
|
+
default_date: current_start,
|
|
109
|
+
}) %>
|
|
110
|
+
|
|
111
|
+
<%= form.actions do |action| %>
|
|
112
|
+
<%= action.submit props: { text: "Apply" } %>
|
|
113
|
+
<%= action.button props: { type: "reset", text: "Clear", variant: "secondary" } %>
|
|
114
|
+
<% end %>
|
|
115
|
+
<% end %>
|
|
116
|
+
<% end %>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Click an applied filter chip to edit it inline. `interactive_filters` supports:
|
|
2
|
+
|
|
3
|
+
- `type: 'select'` / `'dropdown'`: pick from a list of options.
|
|
4
|
+
- `type: 'date-picker'`: inline calendar. Supports `format`, `min_date`, `max_date`, and `mode`.
|
|
5
|
+
|
|
6
|
+
Each entry needs a `target_input` that points to the form control it updates. For `select` and `date-picker`, use the input's `id`. For `dropdown`, use the Dropdown kit's `id`.
|
|
7
|
+
|
|
8
|
+
For date ranges, use `type: 'dropdown'` with `variant: 'quickpick'`. The Filter kit generates the same quickpick options as Dropdown, so no `options` are needed. Values are quickpick ids, such as `quickpick-this-week`.
|
|
9
|
+
|
|
10
|
+
Chip edits update the linked control inside the filter popover. Click **Apply** to submit, then pass the submitted values back into `filters` so chips re-render with the latest labels.
|
|
11
|
+
|
|
12
|
+
Optional `auto_submit: true` on a chip entry submits the form immediately when a chip value is picked.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
|
|
3
|
+
import Filter from "../_filter";
|
|
4
|
+
|
|
5
|
+
import Button from "../../pb_button/_button";
|
|
6
|
+
import DatePicker from "../../pb_date_picker/_date_picker";
|
|
7
|
+
import Dropdown from "../../pb_dropdown/_dropdown";
|
|
8
|
+
import Flex from "../../pb_flex/_flex";
|
|
9
|
+
import Select from "../../pb_select/_select";
|
|
10
|
+
|
|
11
|
+
const territorySelectOptions = [
|
|
12
|
+
{ value: "USA" },
|
|
13
|
+
{ value: "Canada" },
|
|
14
|
+
{ value: "Brazil" },
|
|
15
|
+
{ value: "Philippines" },
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
const statusDropdownOptions = [
|
|
19
|
+
{ id: "open", label: "Open", value: "open" },
|
|
20
|
+
{ id: "in_progress", label: "In progress", value: "in_progress" },
|
|
21
|
+
{ id: "resolved", label: "Resolved", value: "resolved" },
|
|
22
|
+
{ id: "closed", label: "Closed", value: "closed" },
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
const INITIAL_FILTERS = {
|
|
26
|
+
territory: "USA",
|
|
27
|
+
status: "open",
|
|
28
|
+
dateRange: "quickpick-this-week",
|
|
29
|
+
startDate: "05/01/2026",
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const statusOptionForValue = (value) =>
|
|
33
|
+
value
|
|
34
|
+
? statusDropdownOptions.find((opt) => opt.value === value)
|
|
35
|
+
: undefined;
|
|
36
|
+
|
|
37
|
+
const FilterInteractive = (props) => {
|
|
38
|
+
const [filters, setFilters] = useState(INITIAL_FILTERS);
|
|
39
|
+
|
|
40
|
+
const updateFilter = (key) => (value) =>
|
|
41
|
+
setFilters((prev) => ({ ...prev, [key]: value }));
|
|
42
|
+
|
|
43
|
+
const handleClear = () => {
|
|
44
|
+
setFilters(INITIAL_FILTERS);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<Filter
|
|
49
|
+
{...props}
|
|
50
|
+
filters={{
|
|
51
|
+
Territory: filters.territory,
|
|
52
|
+
Status: filters.status,
|
|
53
|
+
"Date range": filters.dateRange,
|
|
54
|
+
"Start date": filters.startDate,
|
|
55
|
+
}}
|
|
56
|
+
interactiveFilters={{
|
|
57
|
+
Territory: {
|
|
58
|
+
type: "select",
|
|
59
|
+
options: territorySelectOptions,
|
|
60
|
+
value: filters.territory,
|
|
61
|
+
onChange: updateFilter("territory"),
|
|
62
|
+
},
|
|
63
|
+
Status: {
|
|
64
|
+
type: "dropdown",
|
|
65
|
+
options: statusDropdownOptions,
|
|
66
|
+
value: filters.status,
|
|
67
|
+
onChange: updateFilter("status"),
|
|
68
|
+
},
|
|
69
|
+
"Date range": {
|
|
70
|
+
type: "dropdown",
|
|
71
|
+
variant: "quickpick",
|
|
72
|
+
value: filters.dateRange,
|
|
73
|
+
onChange: updateFilter("dateRange"),
|
|
74
|
+
},
|
|
75
|
+
"Start date": {
|
|
76
|
+
type: "date-picker",
|
|
77
|
+
value: filters.startDate,
|
|
78
|
+
onChange: updateFilter("startDate"),
|
|
79
|
+
format: "m/d/Y",
|
|
80
|
+
},
|
|
81
|
+
}}
|
|
82
|
+
minWidth="360px"
|
|
83
|
+
results={546}
|
|
84
|
+
sortOptions={{
|
|
85
|
+
popularity: "Popularity",
|
|
86
|
+
}}
|
|
87
|
+
sortValue={[{ name: "popularity", dir: "desc" }]}
|
|
88
|
+
>
|
|
89
|
+
{({ closePopover }) => (
|
|
90
|
+
<form>
|
|
91
|
+
<Select
|
|
92
|
+
{...props}
|
|
93
|
+
label="Territory"
|
|
94
|
+
name="location"
|
|
95
|
+
onChange={(e) => updateFilter("territory")(e.target.value)}
|
|
96
|
+
options={territorySelectOptions}
|
|
97
|
+
value={filters.territory}
|
|
98
|
+
/>
|
|
99
|
+
<Dropdown
|
|
100
|
+
{...props}
|
|
101
|
+
blankSelection="Select status..."
|
|
102
|
+
defaultValue={statusOptionForValue(filters.status)}
|
|
103
|
+
key={filters.status || "cleared"}
|
|
104
|
+
label="Status"
|
|
105
|
+
marginBottom="sm"
|
|
106
|
+
onSelect={(option) =>
|
|
107
|
+
updateFilter("status")(option ? option.value : "")
|
|
108
|
+
}
|
|
109
|
+
options={statusDropdownOptions}
|
|
110
|
+
/>
|
|
111
|
+
|
|
112
|
+
<Dropdown
|
|
113
|
+
{...props}
|
|
114
|
+
key={filters.dateRange || "cleared"}
|
|
115
|
+
label="Date range"
|
|
116
|
+
marginBottom="sm"
|
|
117
|
+
onSelect={(option) =>
|
|
118
|
+
updateFilter("dateRange")(option ? option.id : "")
|
|
119
|
+
}
|
|
120
|
+
variant="quickpick"
|
|
121
|
+
/>
|
|
122
|
+
|
|
123
|
+
<DatePicker
|
|
124
|
+
{...props}
|
|
125
|
+
inputValue={filters.startDate}
|
|
126
|
+
label="Start date"
|
|
127
|
+
onChange={updateFilter("startDate")}
|
|
128
|
+
pickerId="filter-panel-start-date"
|
|
129
|
+
/>
|
|
130
|
+
|
|
131
|
+
<Flex
|
|
132
|
+
{...props}
|
|
133
|
+
spacing="between"
|
|
134
|
+
>
|
|
135
|
+
<Button
|
|
136
|
+
{...props}
|
|
137
|
+
onClick={closePopover}
|
|
138
|
+
text="Apply"
|
|
139
|
+
/>
|
|
140
|
+
<Button
|
|
141
|
+
{...props}
|
|
142
|
+
onClick={handleClear}
|
|
143
|
+
text="Clear"
|
|
144
|
+
variant="secondary"
|
|
145
|
+
/>
|
|
146
|
+
</Flex>
|
|
147
|
+
</form>
|
|
148
|
+
)}
|
|
149
|
+
</Filter>
|
|
150
|
+
);
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
export default FilterInteractive;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Click an applied filter chip to edit it inline. `interactiveFilters` supports:
|
|
2
|
+
|
|
3
|
+
- `type: 'select'` / `'dropdown'`: pick from a list of options.
|
|
4
|
+
- `type: 'date-picker'`: inline calendar. Supports `format`, `minDate`, `maxDate`, and `mode`.
|
|
5
|
+
|
|
6
|
+
For date ranges, use `type: 'dropdown'` with `variant: 'quickpick'`. The Filter kit generates the same quickpick options as Dropdown, so no `options` are needed. Values are quickpick ids, such as `quickpick-this-week`.
|
|
7
|
+
|
|
8
|
+
Keep `filters`, `interactiveFilters.value`, and the filter popover fields backed by the same state so chip labels and form controls stay in sync.
|
|
9
|
+
|
|
10
|
+
On Rails, pass `interactive_filters` with `target_input` so chip picks update the linked form control. Re-read submitted params in your view after Apply so `filters` reflects the new values.
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true } %>
|
|
33
33
|
|
|
34
34
|
<%= form.actions do |action| %>
|
|
35
|
-
<%= action.submit props: { text: "Apply", data: { disable_with: "
|
|
35
|
+
<%= action.submit props: { text: "Apply", data: { disable_with: "pb_rails('icon', props: { icon: 'spinner', spin: true, fixed_width: true })Searching...".html_safe },}%>
|
|
36
36
|
<%= action.button props: { type: "reset", text: "Clear", variant: "secondary" } %>
|
|
37
37
|
<% end %>
|
|
38
38
|
<% end %>
|
|
@@ -12,6 +12,7 @@ examples:
|
|
|
12
12
|
- filter_placement: Filter Placement
|
|
13
13
|
- filter_popover_props: Popover Props
|
|
14
14
|
- filter_within_turbo_frames: Within Turbo Frames
|
|
15
|
+
- filter_interactive: Interactive Applied Filters
|
|
15
16
|
|
|
16
17
|
react:
|
|
17
18
|
- filter_default: Default
|
|
@@ -25,4 +26,5 @@ examples:
|
|
|
25
26
|
- filter_placement: Filter Placement
|
|
26
27
|
- filter_popover_props: Popover Props
|
|
27
28
|
- filter_sidebar: Sidebar
|
|
29
|
+
- filter_interactive_react: Interactive Applied Filters
|
|
28
30
|
|
|
@@ -8,4 +8,5 @@ export { default as FilterMaxWidth } from './_filter_max_width.jsx'
|
|
|
8
8
|
export { default as FilterMaxHeight } from './_filter_max_height.jsx'
|
|
9
9
|
export { default as FilterPlacement } from './_filter_placement.jsx'
|
|
10
10
|
export { default as FilterPopoverProps } from './_filter_popover_props.jsx'
|
|
11
|
-
export { default as FilterSidebar } from './_filter_sidebar.jsx'
|
|
11
|
+
export { default as FilterSidebar } from './_filter_sidebar.jsx'
|
|
12
|
+
export { default as FilterInteractiveReact } from './_filter_interactive_react.jsx'
|
|
@@ -131,23 +131,24 @@
|
|
|
131
131
|
%>
|
|
132
132
|
|
|
133
133
|
<%= pb_form_with(scope: :example, url: "", method: :get, validate: true) do |form| %>
|
|
134
|
-
<%= form.typeahead :
|
|
135
|
-
<%= form.text_field :
|
|
136
|
-
<%= form.text_field :
|
|
137
|
-
<%= form.phone_number_field :
|
|
138
|
-
<%= form.email_field :
|
|
139
|
-
<%= form.number_field :
|
|
140
|
-
<%= form.search_field :
|
|
141
|
-
<%= form.password_field :
|
|
142
|
-
<%= form.url_field :
|
|
143
|
-
<%= form.text_area :
|
|
144
|
-
<%= form.text_area :
|
|
145
|
-
|
|
146
|
-
<%= form.
|
|
147
|
-
<%= form.date_picker :example_date_picker_required_indicator, props: { label: true, required: true, required_indicator: true } %>
|
|
148
|
-
<%= form.date_picker :example_date_picker_required_indicator_custom, props: { label: "Custom Date Picker Label", required: true, required_indicator: true } %>
|
|
134
|
+
<%= form.typeahead :example_typeahead_required_indicator, props: { label: true, required: true, required_indicator: true } %>
|
|
135
|
+
<%= form.text_field :example_text_field_required_indicator, props: { label: true, required: true, required_indicator: true } %>
|
|
136
|
+
<%= form.text_field :example_text_field_required_indicator_custom, props: { label: "Text Field Custom Label", required: true, required_indicator: true } %>
|
|
137
|
+
<%= form.phone_number_field :example_phone_number_field_required_indicator, props: { label: true, required: true, required_indicator: true } %>
|
|
138
|
+
<%= form.email_field :example_email_field_required_indicator, props: { label: true, required: true, required_indicator: true } %>
|
|
139
|
+
<%= form.number_field :example_number_field_required_indicator, props: { label: true, required: true, required_indicator: true } %>
|
|
140
|
+
<%= form.search_field :example_search_field_required_indicator, props: { label: true, required: true, required_indicator: true } %>
|
|
141
|
+
<%= form.password_field :example_password_field_required_indicator, props: { label: true, required: true, required_indicator: true } %>
|
|
142
|
+
<%= form.url_field :example_url_field_required_indicator, props: { label: true, required: true, required_indicator: true } %>
|
|
143
|
+
<%= form.text_area :example_text_area_required_indicator, props: { label: true, required: true, required_indicator: true } %>
|
|
144
|
+
<%= form.text_area :example_text_area_required_indicator_custom, props: { label: "Textarea Custom Label", required: true, required_indicator: true } %>
|
|
145
|
+
<%= form.dropdown_field :example_dropdown_required_indicator, props: { label: true, options: example_dropdown_options, required: true, required_indicator: true } %>
|
|
146
|
+
<%= form.dropdown_field :example_dropdown_required_indicator_multi, props: { label: "Dropdown Custom Label", options: example_dropdown_options, multi_select: true, required: true, required_indicator: true } %>
|
|
149
147
|
<%= form.select :example_select_required_indicator, [["Yes", 1], ["No", 2]], props: { label: true, required: true, required_indicator: true } %>
|
|
150
|
-
<%= form.select :
|
|
148
|
+
<%= form.select :example_select_required_indicator_custom, [["Yes", 1], ["No", 2]], props: { label: "Example Select Field", required: true, required_indicator: true } %>
|
|
149
|
+
<%# form.check_box :example_checkbox_required_indicator, props: { label: true, text: "Checkbox Label", required: true, required_indicator: true } %>
|
|
150
|
+
<%= form.date_picker :example_date_picker_required_indicator, props: { label: true, required: true, required_indicator: true } %>
|
|
151
|
+
<%= form.date_picker :example_date_picker_required_indicator_custom, props: { label: "Date Picker Custom Label", required: true, required_indicator: true } %>
|
|
151
152
|
<%= form.multi_level_select :example_multi_level_select_required_indicator, props: {
|
|
152
153
|
label: true,
|
|
153
154
|
margin_y: 'sm',
|
|
@@ -156,14 +157,14 @@
|
|
|
156
157
|
tree_data: tree_data
|
|
157
158
|
} %>
|
|
158
159
|
<%= form.multi_level_select :example_multi_level_select_required_indicator_custom, props: {
|
|
159
|
-
label: "
|
|
160
|
+
label: "Multi Level Select Custom Label",
|
|
160
161
|
margin_y: 'sm',
|
|
161
162
|
required: true,
|
|
162
163
|
required_indicator: true,
|
|
163
164
|
tree_data: tree_data
|
|
164
165
|
} %>
|
|
165
|
-
<%= form.
|
|
166
|
-
<%= form.
|
|
166
|
+
<%= form.time_picker :example_time_picker_required_indicator, props: { label: true, required: true, required_indicator: true } %>
|
|
167
|
+
<%= form.time_picker :example_time_picker_required_indicator_custom, props: { label: "Time Picker Custom Label", required: true, required_indicator: true } %>
|
|
167
168
|
|
|
168
169
|
<%= form.actions do |action| %>
|
|
169
170
|
<%= action.submit %>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<%= pb_rails("loading_inline", props: { text: " Light" }) %>
|
|
2
|
+
|
|
3
|
+
<br/>
|
|
4
|
+
|
|
5
|
+
<%= pb_rails("loading_inline", props: { color: "default", text: " Default" }) %>
|
|
6
|
+
|
|
7
|
+
<br/>
|
|
8
|
+
|
|
9
|
+
<%= pb_rails("loading_inline", props: { color: "lighter", text: " Lighter" }) %>
|
|
10
|
+
|
|
11
|
+
<br/>
|
|
12
|
+
|
|
13
|
+
<%= pb_rails("loading_inline", props: { color: "link", text: " Link" }) %>
|
|
14
|
+
|
|
15
|
+
<br/>
|
|
16
|
+
|
|
17
|
+
<%= pb_rails("loading_inline", props: { color: "error", text: " Error" }) %>
|
|
18
|
+
|
|
19
|
+
<br/>
|
|
20
|
+
|
|
21
|
+
<%= pb_rails("loading_inline", props: { color: "success", text: " Success" }) %>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import LoadingInline from '../_loading_inline'
|
|
3
|
+
|
|
4
|
+
const LoadingInlineColor = (props) => (
|
|
5
|
+
<div>
|
|
6
|
+
<LoadingInline
|
|
7
|
+
text=" Light"
|
|
8
|
+
{...props}
|
|
9
|
+
/>
|
|
10
|
+
|
|
11
|
+
<br/>
|
|
12
|
+
|
|
13
|
+
<LoadingInline
|
|
14
|
+
color="default"
|
|
15
|
+
text=" Default"
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
<br/>
|
|
22
|
+
|
|
23
|
+
<LoadingInline
|
|
24
|
+
color="lighter"
|
|
25
|
+
text=" Lighter"
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
|
|
29
|
+
<br/>
|
|
30
|
+
|
|
31
|
+
<LoadingInline
|
|
32
|
+
color="link"
|
|
33
|
+
text=" Link"
|
|
34
|
+
{...props}
|
|
35
|
+
/>
|
|
36
|
+
|
|
37
|
+
<br/>
|
|
38
|
+
|
|
39
|
+
<LoadingInline
|
|
40
|
+
color="error"
|
|
41
|
+
text=" Error"
|
|
42
|
+
{...props}
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
<br/>
|
|
46
|
+
|
|
47
|
+
<LoadingInline
|
|
48
|
+
color="success"
|
|
49
|
+
text=" Success"
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
export default LoadingInlineColor
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
The Loading Inline kit will use `light` color by default. Other available colors are: `default` `lighter` `success` `error` `link`.
|
|
@@ -4,6 +4,7 @@ examples:
|
|
|
4
4
|
- loading_inline_default: Default
|
|
5
5
|
- loading_inline_custom: Custom Text
|
|
6
6
|
- loading_inline_variant: Variant
|
|
7
|
+
- loading_inline_color: Color
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
|
|
@@ -11,3 +12,4 @@ examples:
|
|
|
11
12
|
- loading_inline_default: Default
|
|
12
13
|
- loading_inline_custom: Custom Text
|
|
13
14
|
- loading_inline_variant: Variant
|
|
15
|
+
- loading_inline_color: Color
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { default as LoadingInlineDefault } from './_loading_inline_default.jsx'
|
|
2
2
|
export { default as LoadingInlineCustom } from './_loading_inline_custom.jsx'
|
|
3
3
|
export { default as LoadingInlineVariant } from './_loading_inline_variant.jsx'
|
|
4
|
+
export { default as LoadingInlineColor } from './_loading_inline_color.jsx'
|
|
@@ -19,18 +19,16 @@ const PopoverWithButton = (props) => {
|
|
|
19
19
|
onClick={handleTogglePopover}
|
|
20
20
|
variant="secondary"
|
|
21
21
|
>
|
|
22
|
-
<Flex
|
|
22
|
+
<Flex
|
|
23
|
+
align="center"
|
|
24
|
+
gap="xxs"
|
|
25
|
+
>
|
|
23
26
|
{"Filter By"}
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
fixedWidth
|
|
30
|
-
icon="angle-down"
|
|
31
|
-
margin-left="xxs"
|
|
32
|
-
/>
|
|
33
|
-
</Flex>
|
|
27
|
+
<Icon
|
|
28
|
+
fixedWidth
|
|
29
|
+
flip={showPopover ? "vertical" : "none"}
|
|
30
|
+
icon="angle-down"
|
|
31
|
+
/>
|
|
34
32
|
</Flex>
|
|
35
33
|
</Button>
|
|
36
34
|
)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: playbook_ui_docs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 16.
|
|
4
|
+
version: 16.10.0.pre.rc.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Power UX
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-06-
|
|
12
|
+
date: 2026-06-12 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: playbook_ui
|
|
@@ -723,6 +723,9 @@ files:
|
|
|
723
723
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_week.html.erb
|
|
724
724
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_week.jsx
|
|
725
725
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_week.md
|
|
726
|
+
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_year_asc.html.erb
|
|
727
|
+
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_year_asc.jsx
|
|
728
|
+
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_year_asc.md
|
|
726
729
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_year_range.html.erb
|
|
727
730
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_year_range.jsx
|
|
728
731
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_year_range.md
|
|
@@ -1090,6 +1093,10 @@ files:
|
|
|
1090
1093
|
- app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb
|
|
1091
1094
|
- app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx
|
|
1092
1095
|
- app/pb_kits/playbook/pb_filter/docs/_filter_default.md
|
|
1096
|
+
- app/pb_kits/playbook/pb_filter/docs/_filter_interactive.html.erb
|
|
1097
|
+
- app/pb_kits/playbook/pb_filter/docs/_filter_interactive.md
|
|
1098
|
+
- app/pb_kits/playbook/pb_filter/docs/_filter_interactive_react.jsx
|
|
1099
|
+
- app/pb_kits/playbook/pb_filter/docs/_filter_interactive_react.md
|
|
1093
1100
|
- app/pb_kits/playbook/pb_filter/docs/_filter_max_height.html.erb
|
|
1094
1101
|
- app/pb_kits/playbook/pb_filter/docs/_filter_max_height.jsx
|
|
1095
1102
|
- app/pb_kits/playbook/pb_filter/docs/_filter_max_width.html.erb
|
|
@@ -1507,6 +1514,9 @@ files:
|
|
|
1507
1514
|
- app/pb_kits/playbook/pb_list/docs/example.yml
|
|
1508
1515
|
- app/pb_kits/playbook/pb_list/docs/index.js
|
|
1509
1516
|
- app/pb_kits/playbook/pb_loading_inline/docs/_description.md
|
|
1517
|
+
- app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_color.html.erb
|
|
1518
|
+
- app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_color.jsx
|
|
1519
|
+
- app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_color.md
|
|
1510
1520
|
- app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_custom.html.erb
|
|
1511
1521
|
- app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_custom.jsx
|
|
1512
1522
|
- app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_default.html.erb
|