playbook_ui_docs 16.0.0 → 16.1.0.pre.alpha.PLAY2744dropdownquickpickpt113851

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 (53) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.md +2 -2
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading_rails.html.erb +64 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading_rails.md +18 -0
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -0
  6. data/app/pb_kits/playbook/pb_background/docs/_background_responsive.jsx +30 -0
  7. data/app/pb_kits/playbook/pb_background/docs/_background_responsive.md +1 -0
  8. data/app/pb_kits/playbook/pb_background/docs/example.yml +1 -0
  9. data/app/pb_kits/playbook/pb_background/docs/index.js +1 -0
  10. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection_rails.md +3 -0
  11. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection_react.md +3 -0
  12. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_clearable.html.erb +52 -0
  13. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_clearable.jsx +72 -0
  14. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_clearable.md +5 -0
  15. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height.jsx +33 -0
  16. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height_rails.html.erb +20 -0
  17. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height_rails.md +8 -0
  18. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height_react.md +8 -0
  19. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_placeholder.html.erb +9 -0
  20. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_placeholder.jsx +33 -0
  21. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_placeholder.md +3 -0
  22. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +6 -0
  23. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +4 -1
  24. data/app/pb_kits/playbook/pb_form/docs/_form_with_required_indicator.html.erb +3 -1
  25. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options.md +1 -1
  26. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_input_display.html.erb +74 -0
  27. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_input_display.jsx +87 -0
  28. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_input_display.md +3 -0
  29. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.html.erb +135 -0
  30. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.jsx +147 -0
  31. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.md +1 -0
  32. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +35 -31
  33. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +2 -0
  34. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.html.erb +30 -0
  35. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.jsx +1 -1
  36. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.md +1 -1
  37. data/app/pb_kits/playbook/pb_multiple_users/docs/example.yml +1 -0
  38. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_required_indicator.jsx +35 -0
  39. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_required_indicator.md +3 -0
  40. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_required_indicator.html.erb +10 -0
  41. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_required_indicator.jsx +21 -0
  42. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_required_indicator.md +3 -0
  43. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +3 -0
  44. data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +2 -0
  45. data/app/pb_kits/playbook/pb_table/docs/_sections.yml +68 -0
  46. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_input_options.html.erb +39 -0
  47. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_input_options.md +3 -0
  48. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_required_indicator.html.erb +5 -0
  49. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_required_indicator.jsx +25 -0
  50. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_required_indicator.md +3 -0
  51. data/app/pb_kits/playbook/pb_textarea/docs/example.yml +4 -1
  52. data/app/pb_kits/playbook/pb_textarea/docs/index.js +1 -0
  53. metadata +36 -2
@@ -0,0 +1,135 @@
1
+ <% treeData = [
2
+ {
3
+ label: "HQ",
4
+ value: "hQ",
5
+ id: "hq2",
6
+ },
7
+ {
8
+ label: "Philadelphia",
9
+ value: "philadelphia",
10
+ id: "phl2",
11
+ disabled: true,
12
+ children: [
13
+ {
14
+ label: "Marketing & Sales PHL",
15
+ value: "marketingAndSalesPhl",
16
+ id: "marketingPHL2",
17
+ },
18
+ {
19
+ label: "Installation Office PHL",
20
+ value: "installationOfficePhl",
21
+ id: "installationPHL2",
22
+ },
23
+ {
24
+ label: "Warehouse PHL",
25
+ value: "warehousePhl",
26
+ id: "warehousePHL2",
27
+ },
28
+ ]
29
+ },
30
+ {
31
+ label: "New Jersey",
32
+ value: "newJersey",
33
+ id: "nj2",
34
+ children: [
35
+ {
36
+ label: "New Jersey",
37
+ value: "newJersey",
38
+ id: "nj12",
39
+ children: [
40
+ {
41
+ label: "Marketing & Sales NJ",
42
+ value: "marketingAndSalesNj",
43
+ id: "marketingNJ2",
44
+ disabled: true,
45
+ },
46
+ {
47
+ label: "Installation Office NJ",
48
+ value: "installationOfficeNj",
49
+ id: "installationNJ2",
50
+ },
51
+ {
52
+ label: "Warehouse NJ",
53
+ value: "warehouseNj",
54
+ id: "warehouseNJ2",
55
+ },
56
+ ],
57
+ },
58
+ {
59
+ label: "Princeton",
60
+ value: "princeton",
61
+ id: "princeton2",
62
+ children: [
63
+ {
64
+ label: "Marketing & Sales Princeton",
65
+ value: "marketingAndSalesPrinceton",
66
+ id: "marketingPR2",
67
+ },
68
+ {
69
+ label: "Installation Office Princeton",
70
+ value: "installationOfficePrinceton",
71
+ id: "installationPR2",
72
+ disabled: true,
73
+ },
74
+ {
75
+ label: "Warehouse Princeton",
76
+ value: "warehousePrinceton",
77
+ id: "warehousePR2",
78
+ },
79
+ ]
80
+ },
81
+ ]
82
+ },
83
+ {
84
+ label: "Maryland",
85
+ value: "maryland",
86
+ id: "MD2",
87
+ children: [
88
+ {
89
+ label: "Marketing & Sales MD",
90
+ value: "marketingAndSalesMd",
91
+ id: "marketingMD2",
92
+ },
93
+ {
94
+ label: "Installation Office MD",
95
+ value: "installationOfficeMd",
96
+ id: "installationMD2",
97
+ },
98
+ {
99
+ label: "Warehouse MD",
100
+ value: "warehouseMd",
101
+ id: "warehouseMD2",
102
+ },
103
+ ]
104
+ },
105
+ {
106
+ label: "Connecticut",
107
+ value: "connecticut",
108
+ id: "CT2",
109
+ children: [
110
+ {
111
+ label: "Marketing & Sales CT",
112
+ value: "marketingAndSalesCt",
113
+ id: "marketingCT2",
114
+ },
115
+ {
116
+ label: "Installation Office CT",
117
+ value: "installationOfficeCt",
118
+ id: "installationCT2",
119
+ },
120
+ {
121
+ label: "Warehouse CT",
122
+ value: "warehouseCt",
123
+ id: "warehouseCT2",
124
+ },
125
+ ]
126
+ },
127
+ ] %>
128
+
129
+ <%= pb_rails("multi_level_select", props: {
130
+ id: "multi-level-select-single-disabled-rails",
131
+ name: "single_disabled",
132
+ tree_data: treeData,
133
+ input_name: "Power",
134
+ variant: "single"
135
+ }) %>
@@ -0,0 +1,147 @@
1
+ import React from "react";
2
+ import MultiLevelSelect from "../_multi_level_select";
3
+
4
+ const treeData = [
5
+ {
6
+ label: "HQ",
7
+ value: "hQ",
8
+ id: "hq2",
9
+ },
10
+ {
11
+ label: "Philadelphia",
12
+ value: "philadelphia",
13
+ id: "phl2",
14
+ disabled: true,
15
+ children: [
16
+ {
17
+ label: "Marketing & Sales PHL",
18
+ value: "marketingAndSalesPhl",
19
+ id: "marketingPHL2",
20
+ },
21
+ {
22
+ label: "Installation Office PHL",
23
+ value: "installationOfficePhl",
24
+ id: "installationPHL2",
25
+ },
26
+ {
27
+ label: "Warehouse PHL",
28
+ value: "warehousePhl",
29
+ id: "warehousePHL2",
30
+ },
31
+ ]
32
+ },
33
+ {
34
+ label: "New Jersey",
35
+ value: "newJersey",
36
+ id: "nj2",
37
+ children: [
38
+ {
39
+ label: "New Jersey",
40
+ value: "newJersey",
41
+ id: "nj12",
42
+ children: [
43
+ {
44
+ label: "Marketing & Sales NJ",
45
+ value: "marketingAndSalesNj",
46
+ id: "marketingNJ2",
47
+ disabled: true,
48
+ },
49
+ {
50
+ label: "Installation Office NJ",
51
+ value: "installationOfficeNj",
52
+ id: "installationNJ2",
53
+ },
54
+ {
55
+ label: "Warehouse NJ",
56
+ value: "warehouseNj",
57
+ id: "warehouseNJ2",
58
+ },
59
+ ],
60
+ },
61
+ {
62
+ label: "Princeton",
63
+ value: "princeton",
64
+ id: "princeton2",
65
+ children: [
66
+ {
67
+ label: "Marketing & Sales Princeton",
68
+ value: "marketingAndSalesPrinceton",
69
+ id: "marketingPR2",
70
+ },
71
+ {
72
+ label: "Installation Office Princeton",
73
+ value: "installationOfficePrinceton",
74
+ id: "installationPR2",
75
+ disabled: true,
76
+ },
77
+ {
78
+ label: "Warehouse Princeton",
79
+ value: "warehousePrinceton",
80
+ id: "warehousePR2",
81
+ },
82
+ ]
83
+ },
84
+ ]
85
+ },
86
+ {
87
+ label: "Maryland",
88
+ value: "maryland",
89
+ id: "MD2",
90
+ children: [
91
+ {
92
+ label: "Marketing & Sales MD",
93
+ value: "marketingAndSalesMd",
94
+ id: "marketingMD2",
95
+ },
96
+ {
97
+ label: "Installation Office MD",
98
+ value: "installationOfficeMd",
99
+ id: "installationMD2",
100
+ },
101
+ {
102
+ label: "Warehouse MD",
103
+ value: "warehouseMd",
104
+ id: "warehouseMD2",
105
+ },
106
+ ]
107
+ },
108
+ {
109
+ label: "Connecticut",
110
+ value: "connecticut",
111
+ id: "CT2",
112
+ children: [
113
+ {
114
+ label: "Marketing & Sales CT",
115
+ value: "marketingAndSalesCt",
116
+ id: "marketingCT2",
117
+ },
118
+ {
119
+ label: "Installation Office CT",
120
+ value: "installationOfficeCt",
121
+ id: "installationCT2",
122
+ },
123
+ {
124
+ label: "Warehouse CT",
125
+ value: "warehouseCt",
126
+ id: "warehouseCT2",
127
+ },
128
+ ]
129
+ },
130
+ ];
131
+
132
+ const MultiLevelSelectSingleDisabled = (props) => {
133
+ return (
134
+ <div>
135
+ <MultiLevelSelect
136
+ id="multiselect-single-disabled"
137
+ inputName="Power"
138
+ onSelect={(selectedNode) => console.log("Selected Node", selectedNode)}
139
+ treeData={treeData}
140
+ variant="single"
141
+ {...props}
142
+ />
143
+ </div>
144
+ )
145
+ };
146
+
147
+ export default MultiLevelSelectSingleDisabled;
@@ -0,0 +1 @@
1
+ Individual items can be disabled by including `disabled: true` within the object on the treeData for the `single` variant. Disabled options are visibly disabled in the dropdown UI and cannot be selected via mouse click or keyboard navigation. When a parent node is disabled, all of its children are automatically disabled as well.
@@ -1,35 +1,39 @@
1
1
  examples:
2
2
  rails:
3
- - multi_level_select_default: Default
4
- - multi_level_select_single: Single Select
5
- - multi_level_select_single_children_only: Single Select w/ Hidden Radios
6
- - multi_level_select_return_all_selected: Return All Selected
7
- - multi_level_select_selected_ids: Selected Ids
8
- - multi_level_select_with_form: With Form
9
- - multi_level_select_color: With Pills (Custom Color)
10
- - multi_level_select_reset: Reset Selection
11
- - multi_level_select_label: With Label
12
- - multi_level_select_error: Error
13
- - multi_level_select_disabled: Disabled Input
14
- - multi_level_select_disabled_options_default: Disabled Options (Default)
15
- - multi_level_select_disabled_options: Disabled Options (Return All Selected)
16
- - multi_level_select_disabled_options_parent_default: Disabled Parent Option (Default)
17
- - multi_level_select_disabled_options_parent: Disabled Parent Option (Return All Selected)
3
+ - multi_level_select_default: Default
4
+ - multi_level_select_single: Single Select
5
+ - multi_level_select_single_children_only: Single Select w/ Hidden Radios
6
+ - multi_level_select_return_all_selected: Return All Selected
7
+ - multi_level_select_input_display: With Input Display None
8
+ - multi_level_select_selected_ids: Selected Ids
9
+ - multi_level_select_with_form: With Form
10
+ - multi_level_select_color: With Pills (Custom Color)
11
+ - multi_level_select_reset: Reset Selection
12
+ - multi_level_select_label: With Label
13
+ - multi_level_select_error: Error
14
+ - multi_level_select_disabled: Disabled Input
15
+ - multi_level_select_disabled_options_default: Disabled Options (Default)
16
+ - multi_level_select_disabled_options: Disabled Options (Return All Selected)
17
+ - multi_level_select_disabled_options_parent_default: Disabled Parent Option (Default)
18
+ - multi_level_select_disabled_options_parent: Disabled Parent Option (Return All Selected)
19
+ - multi_level_select_single_disabled: Disabled Options (Single Select)
18
20
 
19
21
  react:
20
- - multi_level_select_default: Default
21
- - multi_level_select_react_hook: React Hook
22
- - multi_level_select_single: Single Select
23
- - multi_level_select_single_children_only: Single Select w/ Hidden Radios
24
- - multi_level_select_return_all_selected: Return All Selected
25
- - multi_level_select_selected_ids_react: Selected Ids
26
- - multi_level_select_color: With Pills (Custom Color)
27
- - multi_level_select_with_children: Checkboxes With Children
28
- - multi_level_select_with_children_with_radios: Single Select With Children
29
- - multi_level_select_label: With Label
30
- - multi_level_select_error: Error
31
- - multi_level_select_disabled: Disabled Input
32
- - multi_level_select_disabled_options_default: Disabled Options (Default)
33
- - multi_level_select_disabled_options: Disabled Options (Return All Selected)
34
- - multi_level_select_disabled_options_parent_default: Disabled Parent Option (Default)
35
- - multi_level_select_disabled_options_parent: Disabled Parent Option (Return All Selected)
22
+ - multi_level_select_default: Default
23
+ - multi_level_select_react_hook: React Hook
24
+ - multi_level_select_single: Single Select
25
+ - multi_level_select_single_children_only: Single Select w/ Hidden Radios
26
+ - multi_level_select_return_all_selected: Return All Selected
27
+ - multi_level_select_input_display: With Input Display None
28
+ - multi_level_select_selected_ids_react: Selected Ids
29
+ - multi_level_select_color: With Pills (Custom Color)
30
+ - multi_level_select_with_children: Checkboxes With Children
31
+ - multi_level_select_with_children_with_radios: Single Select With Children
32
+ - multi_level_select_label: With Label
33
+ - multi_level_select_error: Error
34
+ - multi_level_select_disabled: Disabled Input
35
+ - multi_level_select_disabled_options_default: Disabled Options (Default)
36
+ - multi_level_select_disabled_options: Disabled Options (Return All Selected)
37
+ - multi_level_select_disabled_options_parent_default: Disabled Parent Option (Default)
38
+ - multi_level_select_disabled_options_parent: Disabled Parent Option (Return All Selected)
39
+ - multi_level_select_single_disabled: Disabled Options (Single Select)
@@ -4,6 +4,7 @@ export { default as MultiLevelSelectSingleChildrenOnly } from './_multi_level_se
4
4
  export { default as MultiLevelSelectReturnAllSelected } from './_multi_level_select_return_all_selected.jsx'
5
5
  export { default as MultiLevelSelectSelectedIdsReact } from "./_multi_level_select_selected_ids_react.jsx"
6
6
  export { default as MultiLevelSelectColor } from './_multi_level_select_color.jsx'
7
+ export { default as MultiLevelSelectInputDisplay } from './_multi_level_select_input_display.jsx'
7
8
  export { default as MultiLevelSelectWithChildren } from './_multi_level_select_with_children.jsx'
8
9
  export { default as MultiLevelSelectWithChildrenWithRadios } from './_multi_level_select_with_children_with_radios.jsx'
9
10
  export { default as MultiLevelSelectDisabled } from './_multi_level_select_disabled.jsx'
@@ -14,3 +15,4 @@ export { default as MultiLevelSelectDisabledOptionsParent } from './_multi_level
14
15
  export { default as MultiLevelSelectDisabledOptionsParentDefault } from './_multi_level_select_disabled_options_parent_default.jsx'
15
16
  export { default as MultiLevelSelectDisabledOptionsDefault } from './_multi_level_select_disabled_options_default.jsx'
16
17
  export { default as MultiLevelSelectLabel } from './_multi_level_select_label.jsx'
18
+ export { default as MultiLevelSelectSingleDisabled } from './_multi_level_select_single_disabled.jsx'
@@ -0,0 +1,30 @@
1
+ <%= pb_rails("multiple_users", props: {
2
+ with_tooltip: true,
3
+ users: [
4
+ {
5
+ name: "Patrick Welch",
6
+ image_url: "https://randomuser.me/api/portraits/men/9.jpg",
7
+ tooltip: "Patrick Welch - Online"
8
+ },
9
+ {
10
+ name: "Lucille Sanchez",
11
+ image_url: "https://randomuser.me/api/portraits/women/6.jpg",
12
+ tooltip: "Lucille Sanchez - Offline"
13
+ },
14
+ {
15
+ name: "Beverly Reyes",
16
+ image_url: "https://randomuser.me/api/portraits/women/74.jpg",
17
+ tooltip: "Beverly Reyes - Online"
18
+ },
19
+ {
20
+ name: "Keith Craig",
21
+ image_url: "https://randomuser.me/api/portraits/men/40.jpg",
22
+ tooltip: "Keith Craig - Away"
23
+ },
24
+ {
25
+ name: "Alicia Cooper",
26
+ image_url: "https://randomuser.me/api/portraits/women/46.jpg",
27
+ tooltip: "Alicia Cooper - Busy"
28
+ }
29
+ ]
30
+ }) %>
@@ -38,5 +38,5 @@ const MultipleUsersWithTooltip = (props) => {
38
38
  </div>
39
39
  )
40
40
  }
41
- ``
41
+
42
42
  export default MultipleUsersWithTooltip
@@ -1 +1 @@
1
- Use the `withTooltip` boolean prop to enable setting user-specific tooltip content via the `tooltip` property in the users array.
1
+ Use the `withTooltip` / `with_tooltip` boolean prop to enable setting user-specific tooltip content via the `tooltip` property in the users array.
@@ -4,6 +4,7 @@ examples:
4
4
  - multiple_users_default: Default
5
5
  - multiple_users_reverse: Reverse
6
6
  - multiple_users_size: Size
7
+ - multiple_users_with_tooltip: With Tooltip
7
8
 
8
9
 
9
10
  react:
@@ -0,0 +1,35 @@
1
+ import React from 'react'
2
+ import RichTextEditor from '../../pb_rich_text_editor/_rich_text_editor'
3
+ import { useEditor, EditorContent } from "@tiptap/react"
4
+ import StarterKit from "@tiptap/starter-kit"
5
+ import Link from '@tiptap/extension-link'
6
+
7
+
8
+ const RichTextEditorAdvancedRequiredIndicator = (props) => {
9
+
10
+ const editor = useEditor({
11
+ extensions: [
12
+ StarterKit,
13
+ Link
14
+ ],
15
+ content:"Add your text here. You can format your text, add links, quotes, and bullets."
16
+ })
17
+ if (!editor) {
18
+ return null
19
+ }
20
+
21
+ return (
22
+ <div>
23
+ <RichTextEditor
24
+ advancedEditor={editor}
25
+ label="Label"
26
+ requiredIndicator
27
+ {...props}
28
+ >
29
+ <EditorContent editor={editor}/>
30
+ </RichTextEditor>
31
+ </div>
32
+ )
33
+ }
34
+
35
+ export default RichTextEditorAdvancedRequiredIndicator
@@ -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.
@@ -0,0 +1,10 @@
1
+ <%= pb_rails("rich_text_editor", props: {
2
+ id: "required-indicator",
3
+ input_options: {
4
+ id: 'hidden_input_id',
5
+ name: "hidden_input_name"
6
+ },
7
+ label: "Label",
8
+ required_indicator: true,
9
+ value: "Add your text here. You can format your text, add links, quotes, and bullets."
10
+ }) %>
@@ -0,0 +1,21 @@
1
+ import React, { useState } from 'react'
2
+ import RichTextEditor from '../../pb_rich_text_editor/_rich_text_editor'
3
+
4
+ const RichTextEditorRequiredIndicator = (props) => {
5
+ const [value, setValue] = useState('Add your text here. You can format your text, add links, quotes, and bullets.'),
6
+ handleOnChange = (html) => setValue(html)
7
+
8
+ return (
9
+ <div>
10
+ <RichTextEditor
11
+ label="Label"
12
+ onChange={handleOnChange}
13
+ requiredIndicator
14
+ value={value}
15
+ {...props}
16
+ />
17
+ </div>
18
+ )
19
+ }
20
+
21
+ export default RichTextEditorRequiredIndicator
@@ -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.
@@ -9,6 +9,7 @@ examples:
9
9
  - rich_text_editor_templates: Templates
10
10
  # - rich_text_editor_toolbar_bottom: Toolbar Bottom
11
11
  - rich_text_editor_inline: Inline
12
+ - rich_text_editor_required_indicator: Required Indicator
12
13
  - rich_text_editor_preview: Preview
13
14
 
14
15
  react:
@@ -31,5 +32,7 @@ examples:
31
32
  - rich_text_editor_advanced_inline: Advanced (Inline)
32
33
  - rich_text_editor_advanced_height: Advanced Height
33
34
  - rich_text_editor_advanced_min_height: Advanced Min Height
35
+ - rich_text_editor_required_indicator: Required Indicator
36
+ - rich_text_editor_advanced_required_indicator: Advanced Required Indicator
34
37
  - rich_text_editor_preview: Preview
35
38
  - rich_text_editor_advanced_preview: Advanced Preview
@@ -19,3 +19,5 @@ export { default as RichTextEditorAdvancedSticky } from './_rich_text_editor_adv
19
19
  export { default as RichTextEditorAdvancedInline } from './_rich_text_editor_advanced_inline.jsx'
20
20
  export { default as RichTextEditorAdvancedHeight } from './_rich_text_editor_advanced_height.jsx'
21
21
  export { default as RichTextEditorAdvancedMinHeight } from './_rich_text_editor_advanced_min_height.jsx'
22
+ export { default as RichTextEditorRequiredIndicator } from './_rich_text_editor_required_indicator.jsx'
23
+ export { default as RichTextEditorAdvancedRequiredIndicator } from './_rich_text_editor_advanced_required_indicator.jsx'
@@ -0,0 +1,68 @@
1
+ sections:
2
+ - title: "Size & Density"
3
+ examples:
4
+ - table_sm
5
+ - table_md
6
+ - table_lg
7
+ - table_multiline
8
+ - table_single_line
9
+ - table_outer_padding
10
+
11
+ - title: "Layout & Structure"
12
+ examples:
13
+ - table_responsive_table
14
+ - table_with_subcomponents
15
+ - table_with_subcomponents_as_divs
16
+ - table_with_background_kit
17
+
18
+
19
+ - title: "Sticky & Positional Behaviors"
20
+ examples:
21
+ - table_sticky
22
+ - table_sticky_left_columns
23
+ - table_sticky_right_columns
24
+ - table_sticky_columns
25
+ - table_alignment_row
26
+ - table_alignment_column
27
+ - table_alignment_shift_row
28
+ - table_alignment_shift_data
29
+ - table_side_highlight
30
+ - table_container
31
+
32
+ - title: "Collapsible & Nested Behaviors"
33
+ examples:
34
+ - table_with_collapsible
35
+ - table_with_dynamic_collapsible
36
+ - table_with_collapsible_with_custom_click
37
+ - table_with_collapsible_with_custom_content
38
+ - table_with_collapsible_with_nested_rows
39
+ - table_with_collapsible_with_nested_table
40
+
41
+ - title: "Data Presentation"
42
+ examples:
43
+ - table_data_table
44
+ - table_vertical_border
45
+ - table_striped
46
+
47
+ - title: "Header Variants"
48
+ examples:
49
+ - table_header
50
+ - table_with_header_style_borderless
51
+ - table_with_header_style_floating
52
+
53
+ - title: "Interactive Tables"
54
+ examples:
55
+ - table_with_clickable_rows
56
+ - table_with_selectable_rows
57
+ - table_with_filter_variant
58
+ - table_with_filter_variant_with_pagination
59
+ - table_disable_hover
60
+
61
+ - title: "Table Actions"
62
+ examples:
63
+ - table_one_action
64
+ - table_two_actions
65
+ - table_two_plus_actions
66
+ - table_action_middle
67
+ - table_icon_buttons
68
+
@@ -0,0 +1,39 @@
1
+ <%= pb_rails("textarea", props: {
2
+ label: "ID on Container",
3
+ id: "container-id",
4
+ name: "comment",
5
+ rows: 4
6
+ }) %>
7
+
8
+ <br/>
9
+
10
+ <%= pb_rails("textarea", props: {
11
+ label: "ID on Textarea via input_options",
12
+ input_options: { id: "textarea-id" },
13
+ name: "comment",
14
+ rows: 4
15
+ }) %>
16
+
17
+ <br/>
18
+
19
+ <%= pb_rails("textarea", props: {
20
+ label: "Both Container and Textarea IDs",
21
+ id: "container-id-2",
22
+ input_options: { id: "textarea-id-2" },
23
+ name: "comment",
24
+ rows: 4
25
+ }) %>
26
+
27
+ <br/>
28
+
29
+ <%= pb_rails("textarea", props: {
30
+ label: "Data and ARIA Attributes",
31
+ name: "description",
32
+ rows: 4,
33
+ input_options: {
34
+ 'aria-label': "Enter description",
35
+ 'aria-describedby': "help-text",
36
+ data: { controller: "textarea", action: "focus->handleFocus" },
37
+ id: "description-textarea"
38
+ }
39
+ }) %>
@@ -0,0 +1,3 @@
1
+ Use the `input_options` / `inputOptions` prop to pass additional attributes directly to the underlying `<textarea>` element instead of the outer wrapper. This is useful for applying data attributes, custom IDs, ARIA attributes, or other HTML attributes that need to be on the textarea element itself.
2
+
3
+ Additional HTML attributes (e.g. data or ARIA attributes) can also be passed directly to the `<textarea>` via `input_options`.
@@ -0,0 +1,5 @@
1
+ <%= pb_rails("textarea", props: {
2
+ label: "Label",
3
+ placeholder: "Placeholder text",
4
+ required_indicator: true
5
+ }) %>
@@ -0,0 +1,25 @@
1
+ import React, {useState} from 'react'
2
+
3
+ import Textarea from '../_textarea'
4
+
5
+ const TextareaRequiredIndicator = (props) => {
6
+ const [value, setValue] = useState('Default value text')
7
+ const handleChange = (event) => {
8
+ setValue(event.target.value)
9
+ }
10
+ return (
11
+ <div>
12
+ <Textarea
13
+ label="Label"
14
+ name="comment"
15
+ onChange={(e) => handleChange(e)}
16
+ placeholder="Placeholder text"
17
+ requiredIndicator
18
+ value={value}
19
+ {...props}
20
+ />
21
+ </div>
22
+ )
23
+ }
24
+
25
+ export default TextareaRequiredIndicator