playbook_ui_docs 16.10.0.pre.rc.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c82d4adfa4d9cbd6550580ab6dfd58119365c4efecd5399419d6f6e9eeb5e822
4
- data.tar.gz: 199e229ddfc52a82ff613aa97c7c8cd076f0195e0f7a37e33c3471ab05cdd651
3
+ metadata.gz: 4267f7b437b78af8734c0b08b776a4d8c14c8676bb558bc73ed30890c305d3cc
4
+ data.tar.gz: c565734d3238c9f404ebcff2fa4b159b03aef1b97089c613aa607df543421b28
5
5
  SHA512:
6
- metadata.gz: d8c416f86e1125bee7ff540957a058d8461ddb7e7670fcc7c74cfc0c320714015065aa8fb056425ba3861efa0901d987f767542a5b61b7d534d096a584609253
7
- data.tar.gz: 0a3c47dd180de40f4911e921554d914b90a77700cf3b6abc3a94b8c3d4cd5855a2ae610c476887b33dbd9646bb59e24410b902e26e64ed22120296a351e723f7
6
+ metadata.gz: b0ef9f525463816195a2f3e5ed4ff7d9b684341829979557a99664ee1879fcb65d1da6166003da9758ca64232004a9173c5beb86510e7e09eda31168498d4387
7
+ data.tar.gz: 72079f297c3b342c8a5b34137f6b65a0cb8ff2a82452ccc433664415ca5d83ee93f4d75c59436ff037c85be3da8907c572c0f459345cce8602759c213f597f71
@@ -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.
@@ -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'
@@ -5,7 +5,7 @@ const IconDefault = (props) => {
5
5
  return (
6
6
  <div>
7
7
  <Icon
8
- fixedWidth
8
+ fixedWidth
9
9
  icon="user"
10
10
  {...props}
11
11
  />
@@ -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'
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.10.0.pre.rc.0
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-09 00:00:00.000000000 Z
12
+ date: 2026-06-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: playbook_ui
@@ -1093,6 +1093,10 @@ files:
1093
1093
  - app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb
1094
1094
  - app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx
1095
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
1096
1100
  - app/pb_kits/playbook/pb_filter/docs/_filter_max_height.html.erb
1097
1101
  - app/pb_kits/playbook/pb_filter/docs/_filter_max_height.jsx
1098
1102
  - app/pb_kits/playbook/pb_filter/docs/_filter_max_width.html.erb
@@ -1510,6 +1514,9 @@ files:
1510
1514
  - app/pb_kits/playbook/pb_list/docs/example.yml
1511
1515
  - app/pb_kits/playbook/pb_list/docs/index.js
1512
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
1513
1520
  - app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_custom.html.erb
1514
1521
  - app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_custom.jsx
1515
1522
  - app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_default.html.erb