playbook_ui_docs 16.2.0.pre.alpha.PLAY2719atpinnedrowsrails14418 → 16.2.0.pre.alpha.PLAY2791closeonclick14636

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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -1
  3. data/app/pb_kits/playbook/pb_caption/docs/_caption_colors.html.erb +6 -4
  4. data/app/pb_kits/playbook/pb_caption/docs/_caption_colors.jsx +14 -4
  5. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions.md +1 -0
  6. data/app/pb_kits/playbook/pb_detail/docs/_detail_colors.html.erb +6 -24
  7. data/app/pb_kits/playbook/pb_detail/docs/_detail_colors.jsx +35 -33
  8. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.md +3 -1
  9. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options.jsx +63 -0
  10. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options.md +1 -0
  11. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options_rails.html.erb +16 -0
  12. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options_rails.md +1 -0
  13. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +2 -0
  14. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +1 -0
  15. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +2 -1
  16. data/app/pb_kits/playbook/pb_form/docs/_form_with_required_indicator.html.erb +2 -0
  17. data/app/pb_kits/playbook/pb_link/docs/_link_underline.jsx +31 -1
  18. data/app/pb_kits/playbook/pb_select/docs/_select_required_indicator.html.erb +24 -0
  19. data/app/pb_kits/playbook/pb_select/docs/_select_required_indicator.jsx +33 -0
  20. data/app/pb_kits/playbook/pb_select/docs/_select_required_indicator.md +3 -0
  21. data/app/pb_kits/playbook/pb_select/docs/example.yml +3 -2
  22. data/app/pb_kits/playbook/pb_select/docs/index.js +1 -0
  23. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_disabled.jsx +11 -13
  24. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_disabled.html.erb +10 -0
  25. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_disabled.jsx +27 -0
  26. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_input_options.jsx +68 -0
  27. data/app/pb_kits/playbook/pb_textarea/docs/example.yml +3 -0
  28. data/app/pb_kits/playbook/pb_textarea/docs/index.js +2 -0
  29. data/app/pb_kits/playbook/pb_title/docs/_title_colors.html.erb +2 -0
  30. data/app/pb_kits/playbook/pb_title/docs/_title_colors.jsx +14 -0
  31. metadata +12 -4
  32. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_rails.html.erb +0 -57
  33. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_rails.md +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41dcbb8c171b1b8083532c83aacae5f106dae3827f545ebc35c3f8d566037439
4
- data.tar.gz: 208a1dcae2ef4c0f2ae5cc62c12d5591c075b4ab263e0ee2de8874a2879462bd
3
+ metadata.gz: f28014e56f7d88c4a128c187a99e3a8cb6998c2100c981a5be083099ef5c3a06
4
+ data.tar.gz: 235156c257aa4d3aead400013fe16d0ce63816c9b84d0f2dba4cce76ed4d11c1
5
5
  SHA512:
6
- metadata.gz: 7d7cd020f1853dd2b9871a1aabf75033db91f1e2efa7fc4bcec2a473d3b0a13552282f8899f72ec03c4fe88e67adb93a57488e9e6dfa51f7002247af38d757ab
7
- data.tar.gz: dcfbf162d9a4680423a51edaedc3381f5f9f699c424977449a7582306c6a9c0bbacc015a4773cb3dab757fbbefe69cddde24cc814460b3d63c54200c2688c229
6
+ metadata.gz: 3fffcdb55840825b309fdaec95e422fff66932112a3a370190e0fda4880a0a20608424eb3cffff8e77c38e13e79644e0fc4950b431b927d0093afba316fc67c7
7
+ data.tar.gz: 37c4450d7dee9857d5733729b698f6361047a75807da7ae6ec0a70e7e29acbe1c4268381eee1ba1d109d6c953e23434533ca96157d7fd3153dc404a2a8fb0bc1
@@ -7,7 +7,6 @@ examples:
7
7
  - advanced_table_table_props: Table Props
8
8
  - advanced_table_sticky_header_rails: Sticky Header
9
9
  - advanced_table_table_props_sticky_header: Sticky Header for Responsive Table
10
- - advanced_table_pinned_rows_rails: Pinned Rows
11
10
  - advanced_table_beta_sort: Enable Sorting
12
11
  - advanced_table_responsive: Responsive Tables
13
12
  - advanced_table_custom_cell_rails: Custom Components for Cells
@@ -1,4 +1,6 @@
1
- <%= pb_rails("caption", props: { text: "Test colors" }) %>
2
- <%= pb_rails("caption", props: { text: "Test colors", color: "success" }) %>
3
- <%= pb_rails("caption", props: { text: "Test colors", color: "error" }) %>
4
- <%= pb_rails("caption", props: { text: "Test colors", color: "link" }) %>
1
+ <%= pb_rails("caption", props: { text: "Caption light" }) %>
2
+ <%= pb_rails("caption", props: { text: "Caption default", color: "default" }) %>
3
+ <%= pb_rails("caption", props: { text: "Caption lighter", color: "lighter" }) %>
4
+ <%= pb_rails("caption", props: { text: "Caption success", color: "success" }) %>
5
+ <%= pb_rails("caption", props: { text: "Caption error", color: "error" }) %>
6
+ <%= pb_rails("caption", props: { text: "Caption link", color: "link" }) %>
@@ -4,23 +4,33 @@ import Caption from "../../pb_caption/_caption"
4
4
  const CaptionColors = (props) => {
5
5
  return (
6
6
  <div>
7
+ <Caption
8
+ text="Caption light"
9
+ {...props}
10
+ />
11
+ <Caption
12
+ color="default"
13
+ text="Caption default"
14
+ {...props}
15
+ />
7
16
  <Caption
8
- text="Test colors"
17
+ color="lighter"
18
+ text="Caption lighter"
9
19
  {...props}
10
20
  />
11
21
  <Caption
12
22
  color="success"
13
- text="Test colors"
23
+ text="Caption success"
14
24
  {...props}
15
25
  />
16
26
  <Caption
17
27
  color="error"
18
- text="Test colors"
28
+ text="Caption error"
19
29
  {...props}
20
30
  />
21
31
  <Caption
22
32
  color="link"
23
- text="Test colors"
33
+ text="Caption link"
24
34
  {...props}
25
35
  />
26
36
  </div>
@@ -1,6 +1,7 @@
1
1
  Datepicker supports `position` options from [Flatpickr Options Documentation](https://flatpickr.js.org/options/). There are multiple positioning options to choose from.
2
2
 
3
3
  **Note:** In order for the above prop to work properly, you must also send `staticPosition={false}` to your Datepicker kit instance.
4
+ If you are using the Datepicker within a Dialog, you cannot use the `staticPosition`/`static_position` prop.
4
5
 
5
6
  #### Affix Datepicker Upon Scrolling
6
7
 
@@ -1,24 +1,6 @@
1
- <%= pb_rails("detail", props: {
2
- text: "I am a detail kit",
3
- color: "default"
4
- }) %>
5
-
6
- <%= pb_rails("detail", props: {
7
- text: "I am a detail kit",
8
- color: "lighter"
9
- }) %>
10
-
11
- <%= pb_rails("detail", props: {
12
- text: "I am a detail kit",
13
- color: "link"
14
- }) %>
15
-
16
- <%= pb_rails("detail", props: {
17
- text: "I am a detail kit",
18
- color: "error"
19
- }) %>
20
-
21
- <%= pb_rails("detail", props: {
22
- text: "I am a detail kit",
23
- color: "success"
24
- }) %>
1
+ <%= pb_rails("detail", props: { text: "I am a detail kit" }) %>
2
+ <%= pb_rails("detail", props: { text: "I am a detail kit", color: "default" }) %>
3
+ <%= pb_rails("detail", props: { text: "I am a detail kit", color: "lighter" }) %>
4
+ <%= pb_rails("detail", props: { text: "I am a detail kit", color: "link" }) %>
5
+ <%= pb_rails("detail", props: { text: "I am a detail kit", color: "error" }) %>
6
+ <%= pb_rails("detail", props: { text: "I am a detail kit", color: "success" }) %>
@@ -1,38 +1,40 @@
1
1
  import React from 'react'
2
2
  import Detail from '../../pb_detail/_detail'
3
3
 
4
- const DetailColors = (props) => (
5
- <div>
6
- <Detail
7
- color="default"
8
- text="I am a detail kit"
9
- {...props}
10
- />
11
-
12
- <Detail
13
- color="lighter"
14
- text="I am a detail kit"
15
- {...props}
16
- />
17
-
18
- <Detail
19
- color="link"
20
- text="I am a detail kit"
21
- {...props}
22
- />
23
-
24
- <Detail
25
- color="error"
26
- text="I am a detail kit"
27
- {...props}
28
- />
29
-
30
- <Detail
31
- color="success"
32
- text="I am a detail kit"
33
- {...props}
34
- />
35
- </div>
36
- )
4
+ const DetailColors = (props) => {
5
+ return (
6
+ <div>
7
+ <Detail
8
+ text="I am a detail kit"
9
+ {...props}
10
+ />
11
+ <Detail
12
+ color="default"
13
+ text="I am a detail kit"
14
+ {...props}
15
+ />
16
+ <Detail
17
+ color="lighter"
18
+ text="I am a detail kit"
19
+ {...props}
20
+ />
21
+ <Detail
22
+ color="link"
23
+ text="I am a detail kit"
24
+ {...props}
25
+ />
26
+ <Detail
27
+ color="error"
28
+ text="I am a detail kit"
29
+ {...props}
30
+ />
31
+ <Detail
32
+ color="success"
33
+ text="I am a detail kit"
34
+ {...props}
35
+ />
36
+ </div>
37
+ )
38
+ }
37
39
 
38
40
  export default DetailColors
@@ -1,4 +1,6 @@
1
1
  The dialog kit also supports customizing your dialog with a [compound component](https://kentcdodds.com/blog/compound-components-with-react-hooks) structure.
2
2
  This allows for greater flexibility and more complex dialogs.
3
3
 
4
- For the Rails version, when using the kit as a compound component it is necessary to pass the same value as the id for the dialog, the dialog header and the dialog footer in order for the opening and closing of the dialog to function as expected.
4
+ For the Rails version, when using the kit as a compound component it is necessary to pass the same value as the id for the dialog, the dialog header and the dialog footer in order for the opening and closing of the dialog to function as expected.
5
+
6
+ If you are using the datepicker within the Rails dialog, do not use the `static_position` prop on the datepicker.
@@ -0,0 +1,63 @@
1
+ import React from 'react'
2
+ import Dropdown from '../../pb_dropdown/_dropdown'
3
+ import Caption from '../../pb_caption/_caption'
4
+
5
+ const DropdownClosingOptions = (props) => {
6
+ const options = [
7
+ {
8
+ label: "United States",
9
+ value: "unitedStates",
10
+ id: "us"
11
+ },
12
+ {
13
+ label: "Canada",
14
+ value: "canada",
15
+ id: "ca"
16
+ },
17
+ {
18
+ label: "Pakistan",
19
+ value: "pakistan",
20
+ id: "pk"
21
+ }
22
+ ];
23
+
24
+ return (
25
+ <>
26
+ <Caption
27
+ marginBottom="xs"
28
+ text="Any"
29
+ />
30
+ <Dropdown
31
+ closeOnClick='any'
32
+ options={options}
33
+ {...props}
34
+ />
35
+
36
+ <br />
37
+
38
+ <Caption
39
+ marginBottom="xs"
40
+ text="Outside"
41
+ />
42
+ <Dropdown
43
+ closeOnClick='outside'
44
+ options={options}
45
+ {...props}
46
+ />
47
+
48
+ <br />
49
+
50
+ <Caption
51
+ marginBottom="xs"
52
+ text="Inside"
53
+ />
54
+ <Dropdown
55
+ closeOnClick='inside'
56
+ options={options}
57
+ {...props}
58
+ />
59
+ </>
60
+ )
61
+ }
62
+
63
+ export default DropdownClosingOptions
@@ -0,0 +1 @@
1
+ The `closeOnClick` prop allows you to control when the Dropdown closes in response to click interactions. The value `any` reflects the default behavior, where the dropdown will close after any click. Set it to `outside` to ensure interactive elements as dropdown options are able to be interacted with or modified. Set it to `inside` for a dropdown that only closes when the input or dropdown menu is clicked.
@@ -0,0 +1,16 @@
1
+ <%
2
+ options = [
3
+ { label: "United States", value: "unitedStates", id: "us" },
4
+ { label: "Canada", value: "canada", id: "ca" },
5
+ { label: "Pakistan", value: "pakistan", id: "pk" },
6
+ ]
7
+ %>
8
+
9
+ <%= pb_rails("caption", props: { margin_bottom: "xs", text: "Any" }) %>
10
+ <%= pb_rails("dropdown", props: { options: options, close_on_click: "any", margin_bottom: "md" }) %>
11
+
12
+ <%= pb_rails("caption", props: { margin_bottom: "xs", text: "Outside" }) %>
13
+ <%= pb_rails("dropdown", props: { options: options, close_on_click: "outside", margin_bottom: "md" }) %>
14
+
15
+ <%= pb_rails("caption", props: { margin_bottom: "xs", text: "Inside" }) %>
16
+ <%= pb_rails("dropdown", props: { options: options, close_on_click: "inside" }) %>
@@ -0,0 +1 @@
1
+ The `close_on_click` prop allows you to control when the Dropdown closes in response to click interactions. The value `any` reflects the default behavior, where the dropdown will close after any click. Set it to `outside` to ensure interactive elements as dropdown options are able to be interacted with or modified. Set it to `inside` for a dropdown that only closes when the input or dropdown menu is clicked.
@@ -25,6 +25,7 @@ examples:
25
25
  - dropdown_separators_hidden: Separators Hidden
26
26
  - dropdown_with_clearable: Clearable
27
27
  - dropdown_with_constrain_height_rails: Constrain Height
28
+ - dropdown_closing_options_rails: Closing Options
28
29
  - dropdown_quickpick_rails: Quick Pick Variant
29
30
  - dropdown_quickpick_range_end_rails: Quick Pick Variant (Range Ends Today)
30
31
  - dropdown_quickpick_default_dates: Quick Pick Variant (Default Dates)
@@ -62,6 +63,7 @@ examples:
62
63
  - dropdown_with_constrain_height: Constrain Height
63
64
  - dropdown_separators_hidden: Separators Hidden
64
65
  - dropdown_with_external_control: useDropdown Hook
66
+ - dropdown_closing_options: Closing Options
65
67
  - dropdown_quickpick: Quick Pick Variant
66
68
  - dropdown_quickpick_range_end: Quick Pick Variant (Range Ends Today)
67
69
  - dropdown_quickpick_default_dates: Quick Pick Variant (Default Dates)
@@ -31,4 +31,5 @@ export { default as DropdownQuickpickWithDatePickers } from './_dropdown_quickpi
31
31
  export { default as DropdownQuickpickCustom } from './_dropdown_quickpick_custom.jsx'
32
32
  export { default as DropdownWithClearable } from './_dropdown_with_clearable.jsx'
33
33
  export { default as DropdownWithConstrainHeight } from './_dropdown_with_constrain_height.jsx'
34
+ export { default as DropdownClosingOptions } from './_dropdown_closing_options.jsx'
34
35
  export { default as DropdownRequiredIndicator } from "./_dropdown_required_indicator.jsx";
@@ -92,7 +92,8 @@
92
92
  <%= form.typeahead :example_typeahead, props: { data: { typeahead_example1: true, user: {} }, label: true, placeholder: "Search for a user" } %>
93
93
  <%= form.text_field :example_text_field, props: { label: true } %>
94
94
  <%= form.text_field :example_text_field_2, props: { label: "Text Field Custom Label" } %>
95
- <%= form.phone_number_field :example_phone_number_field, props: { label: "Example phone field", hidden_inputs: true } %>
95
+ <%= form.phone_number_field :example_phone_number_field, props: { label: true, hidden_inputs: true} %>
96
+ <%= form.intl_telephone :example_intl_telephone, props: { label: true, hidden_inputs: true } %>
96
97
  <%= form.email_field :example_email_field, props: { label: true } %>
97
98
  <%= form.number_field :example_number_field, props: { label: true } %>
98
99
  <%= form.search_field :example_search_field, props: { label: true } %>
@@ -146,6 +146,8 @@
146
146
  <%= form.time_picker :example_time_picker_required_indicator, props: { label: true, required: true, required_indicator: true } %>
147
147
  <%= form.date_picker :example_date_picker_required_indicator, props: { label: true, required: true, required_indicator: true } %>
148
148
  <%= form.date_picker :example_date_picker_required_indicator_custom, props: { label: "Custom Date Picker Label", required: true, required_indicator: true } %>
149
+ <%= form.select :example_select_required_indicator, [["Yes", 1], ["No", 2]], props: { label: true, required: true, required_indicator: true } %>
150
+ <%= form.select :example_select_required_indicator_2, [["Yes", 1], ["No", 2]], props: { label: "Example Select Field", required: true, required_indicator: true } %>
149
151
  <%= form.multi_level_select :example_multi_level_select_required_indicator, props: {
150
152
  label: true,
151
153
  margin_y: 'sm',
@@ -4,7 +4,37 @@ import Link from '../../pb_link/_link'
4
4
  const LinkUnderline = (props) => (
5
5
  <div>
6
6
  <Link
7
- href="#underline"
7
+ href="#underline1"
8
+ text="link example"
9
+ underline
10
+ {...props}
11
+ />
12
+
13
+ <br />
14
+
15
+ <Link
16
+ color="body"
17
+ href="#underline2"
18
+ text="link example"
19
+ underline
20
+ {...props}
21
+ />
22
+
23
+ <br />
24
+
25
+ <Link
26
+ color="muted"
27
+ href="#underline3"
28
+ text="link example"
29
+ underline
30
+ {...props}
31
+ />
32
+
33
+ <br />
34
+
35
+ <Link
36
+ color="destructive"
37
+ href="#underline4"
8
38
  text="link example"
9
39
  underline
10
40
  {...props}
@@ -0,0 +1,24 @@
1
+ <%= pb_rails("select", props: {
2
+ label: "Favorite Snacks",
3
+ name: "food",
4
+ required_indicator: true,
5
+ options: [
6
+ {
7
+ value: "1",
8
+ value_text: "Popcorn",
9
+ },
10
+ {
11
+ value: "2",
12
+ selected: true,
13
+ value_text: "Chips",
14
+ },
15
+ {
16
+ value: "3",
17
+ value_text: "Twizzlers",
18
+ },
19
+ {
20
+ value: "4",
21
+ value_text: "Cookies",
22
+ },
23
+ ]
24
+ }) %>
@@ -0,0 +1,33 @@
1
+ import React from "react";
2
+
3
+ import { Select } from "playbook-ui";
4
+
5
+ const SelectRequiredIndicator = () => {
6
+ const options = [
7
+ {
8
+ value: "1",
9
+ text: "Popcorn",
10
+ },
11
+ {
12
+ value: "2",
13
+ text: "Chips",
14
+ },
15
+ {
16
+ value: "3",
17
+ text: "Twizzlers",
18
+ },
19
+ ];
20
+
21
+ return (
22
+ <div>
23
+ <Select
24
+ label="Favorite Snack"
25
+ name="food"
26
+ options={options}
27
+ requiredIndicator
28
+ />
29
+ </div>
30
+ );
31
+ };
32
+
33
+ export default SelectRequiredIndicator;
@@ -0,0 +1,3 @@
1
+ The `requiredIndicator`/`required_indicator` prop displays a red asterisk (\*) next to the label, visually indicating that the field is required. This is purely visual and does not enforce validation.
2
+
3
+ You can use `requiredIndicator`/`required_indicator` with any validation approach: HTML5 validation via the `required` prop, client-side validation, or backend validation. For this reason, it works independently and doesn't need to be paired with the `required` prop.
@@ -16,7 +16,7 @@ examples:
16
16
  - select_attributes: Select W/ Attributes
17
17
  - select_multiple: Select Multiple
18
18
  - select_input_options: Input Options
19
-
19
+ - select_required_indicator: Required Indicator
20
20
 
21
21
 
22
22
  react:
@@ -35,8 +35,9 @@ examples:
35
35
  - select_multiple: Select Multiple
36
36
  - select_react_hook: React Hook
37
37
  - select_input_options: Input Options
38
+ - select_required_indicator: Required Indicator
38
39
 
39
40
  swift:
40
41
  - select_default_swift: Default
41
42
  - select_error_swift: Error
42
- - select_props_table: ""
43
+ - select_props_table: ""
@@ -13,3 +13,4 @@ export { default as SelectMultiple } from './_select_multiple.jsx'
13
13
  export { default as SelectReactHook } from './_select_react_hook.jsx'
14
14
  export { default as SelectCustomSelectSubheaders } from './_select_custom_select_subheaders.jsx'
15
15
  export { default as SelectInputOptions } from './_select_input_options.jsx'
16
+ export { default as SelectRequiredIndicator } from './_select_required_indicator.jsx'
@@ -2,19 +2,17 @@ import React from 'react'
2
2
 
3
3
  import TextInput from '../_text_input'
4
4
 
5
- class TextInputDisabled extends React.Component {
6
- render(props) {
7
- return (
8
- <div>
9
- <TextInput
10
- disabled
11
- label="Last Name"
12
- placeholder="Enter last name"
13
- {...props}
14
- />
15
- </div>
16
- )
17
- }
5
+ const TextInputDisabled = (props) => {
6
+ return (
7
+ <div>
8
+ <TextInput
9
+ disabled
10
+ label="Last Name"
11
+ placeholder="Enter last name"
12
+ {...props}
13
+ />
14
+ </div>
15
+ )
18
16
  }
19
17
 
20
18
  export default TextInputDisabled
@@ -0,0 +1,10 @@
1
+ <%= pb_rails("textarea", props: { label: "Disabled", rows: 4, id: "disabled-example-1", disabled: true }) %>
2
+
3
+ <br/>
4
+
5
+ <%= pb_rails("textarea", props: {
6
+ label: "Disabled with Placeholder",
7
+ placeholder: "Placeholder text",
8
+ id: "disabled-example-2",
9
+ disabled: true
10
+ }) %>
@@ -0,0 +1,27 @@
1
+ import React from 'react'
2
+
3
+ import Textarea from '../_textarea'
4
+
5
+ const TextareaDefault = (props) => {
6
+ return (
7
+ <>
8
+ <Textarea
9
+ disabled
10
+ id="disabled-example"
11
+ label="Disabled"
12
+ {...props}
13
+ rows={4}
14
+ />
15
+ <Textarea
16
+ disabled
17
+ id="disabled-example-with-placeholder"
18
+ label="Disabled with Placeholder"
19
+ placeholder="Content goes here"
20
+ {...props}
21
+ rows={4}
22
+ />
23
+ </>
24
+ )
25
+ }
26
+
27
+ export default TextareaDefault
@@ -0,0 +1,68 @@
1
+ import React, { useState } from "react"
2
+
3
+ import Textarea from "../_textarea"
4
+
5
+ const TextareaInputOptions = (props) => {
6
+ const [value1, setValue1] = useState("")
7
+ const [value2, setValue2] = useState("")
8
+ const [value3, setValue3] = useState("")
9
+ const [value4, setValue4] = useState("")
10
+
11
+ return (
12
+ <div>
13
+ <Textarea
14
+ id="container-id"
15
+ label="ID on Container"
16
+ name="comment"
17
+ onChange={(e) => setValue1(e.target.value)}
18
+ rows={4}
19
+ value={value1}
20
+ {...props}
21
+ />
22
+
23
+ <br />
24
+
25
+ <Textarea
26
+ inputOptions={{ id: "textarea-id" }}
27
+ label="ID on Textarea via inputOptions"
28
+ name="comment"
29
+ onChange={(e) => setValue2(e.target.value)}
30
+ rows={4}
31
+ value={value2}
32
+ {...props}
33
+ />
34
+
35
+ <br />
36
+
37
+ <Textarea
38
+ id="container-id-2"
39
+ inputOptions={{ id: "textarea-id-2" }}
40
+ label="Both Container and Textarea IDs"
41
+ name="comment"
42
+ onChange={(e) => setValue3(e.target.value)}
43
+ rows={4}
44
+ value={value3}
45
+ {...props}
46
+ />
47
+
48
+ <br />
49
+
50
+ <Textarea
51
+ inputOptions={{
52
+ "aria-label": "Enter description",
53
+ "aria-describedby": "help-text",
54
+ data: { controller: "textarea", action: "focus->handleFocus" },
55
+ id: "description-textarea"
56
+ }}
57
+ label="Data and ARIA Attributes"
58
+ name="description"
59
+ onChange={(e) => setValue4(e.target.value)}
60
+ rows={4}
61
+ value={value4}
62
+ {...props}
63
+ />
64
+ </div>
65
+ )
66
+ }
67
+
68
+ export default TextareaInputOptions
@@ -10,6 +10,7 @@ examples:
10
10
  - textarea_emoji_mask: Emoji Mask
11
11
  - textarea_required_indicator: Required Indicator
12
12
  - textarea_input_options: Input Options
13
+ - textarea_disabled: Disabled
13
14
 
14
15
  react:
15
16
  - textarea_default: Default
@@ -20,6 +21,8 @@ examples:
20
21
  - textarea_inline: Inline
21
22
  - textarea_emoji_mask: Emoji Mask
22
23
  - textarea_required_indicator: Required Indicator
24
+ - textarea_input_options: Input Options
25
+ - textarea_disabled: Disabled
23
26
 
24
27
  swift:
25
28
  - textarea_default_swift: Default
@@ -1,4 +1,5 @@
1
1
  export { default as TextareaDefault } from './_textarea_default.jsx'
2
+ export { default as TextareaDisabled } from './_textarea_disabled.jsx'
2
3
  export { default as TextareaResize } from './_textarea_resize.jsx'
3
4
  export { default as TextareaCustom } from './_textarea_custom.jsx'
4
5
  export { default as TextareaError } from './_textarea_error.jsx'
@@ -6,3 +7,4 @@ export { default as TextareaCharacterCounter } from './_textarea_character_count
6
7
  export { default as TextareaInline } from './_textarea_inline.jsx'
7
8
  export { default as TextareaEmojiMask } from './_textarea_emoji_mask.jsx'
8
9
  export { default as TextareaRequiredIndicator } from './_textarea_required_indicator.jsx'
10
+ export { default as TextareaInputOptions } from "./_textarea_input_options.jsx"
@@ -1,4 +1,6 @@
1
1
  <%= pb_rails("title", props: { text: "Default Color", tag: "h1", size: 3 }) %>
2
+ <%= pb_rails("title", props: { text: "Title Color", tag: "h1", size: 3, color: "light" }) %>
3
+ <%= pb_rails("title", props: { text: "Title Color", tag: "h1", size: 3, color: "lighter" }) %>
2
4
  <%= pb_rails("title", props: { text: "Title Color", tag: "h1", size: 3, color: "link" }) %>
3
5
  <%= pb_rails("title", props: { text: "Title Color", tag: "h1", size: 3, color: "success" }) %>
4
6
  <%= pb_rails("title", props: { text: "Title Color", tag: "h1", size: 3, color: "error" }) %>
@@ -9,6 +9,20 @@ const TitleColors = (props) => {
9
9
  text="Default Color"
10
10
  {...props}
11
11
  />
12
+ <Title
13
+ color="light"
14
+ size={3}
15
+ tag="h1"
16
+ text="Title Color"
17
+ {...props}
18
+ />
19
+ <Title
20
+ color="lighter"
21
+ size={3}
22
+ tag="h1"
23
+ text="Title Color"
24
+ {...props}
25
+ />
12
26
  <Title
13
27
  color="link"
14
28
  size={3}
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.2.0.pre.alpha.PLAY2719atpinnedrowsrails14418
4
+ version: 16.2.0.pre.alpha.PLAY2791closeonclick14636
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-02-13 00:00:00.000000000 Z
12
+ date: 2026-02-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: playbook_ui
@@ -123,8 +123,6 @@ files:
123
123
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx
124
124
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md
125
125
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows.jsx
126
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_rails.html.erb
127
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_rails.md
128
126
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_react.md
129
127
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.html.erb
130
128
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.jsx
@@ -859,6 +857,10 @@ files:
859
857
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection_react.md
860
858
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx
861
859
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.md
860
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options.jsx
861
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options.md
862
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options_rails.html.erb
863
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options_rails.md
862
864
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
863
865
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md
864
866
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.html.erb
@@ -2060,6 +2062,9 @@ files:
2060
2062
  - app/pb_kits/playbook/pb_select/docs/_select_react_hook.md
2061
2063
  - app/pb_kits/playbook/pb_select/docs/_select_required.html.erb
2062
2064
  - app/pb_kits/playbook/pb_select/docs/_select_required.jsx
2065
+ - app/pb_kits/playbook/pb_select/docs/_select_required_indicator.html.erb
2066
+ - app/pb_kits/playbook/pb_select/docs/_select_required_indicator.jsx
2067
+ - app/pb_kits/playbook/pb_select/docs/_select_required_indicator.md
2063
2068
  - app/pb_kits/playbook/pb_select/docs/_select_value_text_same.html.erb
2064
2069
  - app/pb_kits/playbook/pb_select/docs/_select_value_text_same.jsx
2065
2070
  - app/pb_kits/playbook/pb_select/docs/example.yml
@@ -2374,6 +2379,8 @@ files:
2374
2379
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_default.jsx
2375
2380
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_default.md
2376
2381
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_default_swift.md
2382
+ - app/pb_kits/playbook/pb_textarea/docs/_textarea_disabled.html.erb
2383
+ - app/pb_kits/playbook/pb_textarea/docs/_textarea_disabled.jsx
2377
2384
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_emoji_mask.html.erb
2378
2385
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_emoji_mask.jsx
2379
2386
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_emoji_mask.md
@@ -2384,6 +2391,7 @@ files:
2384
2391
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_inline.html.erb
2385
2392
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_inline.jsx
2386
2393
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_input_options.html.erb
2394
+ - app/pb_kits/playbook/pb_textarea/docs/_textarea_input_options.jsx
2387
2395
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_input_options.md
2388
2396
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_props_swift.md
2389
2397
  - app/pb_kits/playbook/pb_textarea/docs/_textarea_required_indicator.html.erb
@@ -1,57 +0,0 @@
1
- <%# Example sort method for demonstration purposes %>
2
- <% if params["sort"] %>
3
- <% sort_param = params["sort"].gsub(/_(asc|desc)\z/, "") %>
4
- <% sort_direction = params["sort"].end_with?("_asc") ? 1 : -1 %>
5
- <% @table_data_with_id.sort! do |a, b|
6
- value_a = a[sort_param] || a[sort_param.to_sym]
7
- value_b = b[sort_param] || b[sort_param.to_sym]
8
-
9
- value_a = value_a.to_i if value_a.is_a?(String) && value_a.match?(/^\d+$/)
10
- value_b = value_b.to_i if value_b.is_a?(String) && value_b.match?(/^\d+$/)
11
-
12
- sort_direction * (value_a <=> value_b)
13
- end %>
14
- <% end %>
15
-
16
- <% column_definitions = [
17
- {
18
- accessor: "year",
19
- label: "Year",
20
- cellAccessors: ["quarter", "month", "day"],
21
- sort_menu: [
22
- { item: "Year", link: "?sort=year_asc#pinned_rows_table", active: params["sort"] == "year_asc", direction: "asc" },
23
- { item: "Year", link: "?sort=year_desc#pinned_rows_table", active: params["sort"] == "year_desc", direction: "desc" }
24
- ],
25
- },
26
- {
27
- accessor: "newEnrollments",
28
- label: "New Enrollments",
29
- },
30
- {
31
- accessor: "scheduledMeetings",
32
- label: "Scheduled Meetings",
33
- },
34
- {
35
- accessor: "attendanceRate",
36
- label: "Attendance Rate",
37
- },
38
- {
39
- accessor: "completedClasses",
40
- label: "Completed Classes",
41
- },
42
- {
43
- accessor: "classCompletionRate",
44
- label: "Class Completion Rate",
45
- },
46
- {
47
- accessor: "graduatedStudents",
48
- label: "Graduated Students",
49
- }
50
- ] %>
51
-
52
- <% pinned_rows = { top: ["8"] } %>
53
-
54
- <%= pb_rails("advanced_table", props: { id: "pinned_rows_table", table_data: @table_data_with_id, column_definitions: column_definitions, max_height: "xs", pinned_rows: pinned_rows, responsive: "none", table_props: { sticky: true }}) do %>
55
- <%= pb_rails("advanced_table/table_header", props: { table_id: "pinned_rows_table", column_definitions: column_definitions }) %>
56
- <%= pb_rails("advanced_table/table_body", props: { table_id: "pinned_rows_table", table_data: @table_data_with_id, column_definitions: column_definitions, pinned_rows: pinned_rows }) %>
57
- <% end %>
@@ -1,7 +0,0 @@
1
- Use the `pinned_rows` prop to pin specific rows to the top of an Advanced Table. Pinned rows will remain at the top when scrolling through table data and will not change position if sorting is used.
2
-
3
- **NOTE:**
4
- - Sticky header required: Pinned rows must be used with `sticky: true` via `table_props` (works with both responsive and non-responsive tables)
5
- - Row ids required: Each object within the `table_data` array must contain a unique `id` in order to attach an id to all Rows for this to function.
6
- - `pinned_rows` takes a hash with a `top` key containing an array of row ids, as shown in the code snippet below.
7
- - For expandable rows, use the parent id in `pinned_rows[:top]`; all its children will automatically be pinned with it. If a child id is passed without the parent being pinned, nothing will be pinned.