playbook_ui_docs 16.2.0 → 16.3.0.pre.alpha.PLAY2782RTEPOCs14847

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 (54) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_cascade_collapse.jsx +50 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_cascade_collapse.md +1 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -0
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -1
  6. data/app/pb_kits/playbook/pb_caption/docs/_caption_colors.html.erb +6 -4
  7. data/app/pb_kits/playbook/pb_caption/docs/_caption_colors.jsx +14 -4
  8. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_positions.md +1 -0
  9. data/app/pb_kits/playbook/pb_detail/docs/_detail_colors.html.erb +6 -24
  10. data/app/pb_kits/playbook/pb_detail/docs/_detail_colors.jsx +35 -33
  11. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.md +3 -1
  12. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_default.html.erb +18 -9
  13. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx +24 -5
  14. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options.jsx +63 -0
  15. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options.md +1 -0
  16. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options_rails.html.erb +16 -0
  17. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options_rails.md +1 -0
  18. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +2 -0
  19. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +1 -0
  20. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +2 -1
  21. data/app/pb_kits/playbook/pb_form/docs/_form_with_required_indicator.html.erb +2 -0
  22. data/app/pb_kits/playbook/pb_link/docs/_link_underline.jsx +31 -1
  23. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_react_reset_key.jsx +100 -0
  24. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_react_reset_key.md +1 -0
  25. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +1 -0
  26. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -0
  27. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default.jsx +1 -1
  28. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_lexxy_default.html.erb +1 -0
  29. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_lexxy_default.md +1 -0
  30. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_quill_default.html.erb +1 -0
  31. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_quill_default.md +1 -0
  32. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_tiptap_default.html.erb +1 -0
  33. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_tiptap_default.md +1 -0
  34. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +3 -0
  35. data/app/pb_kits/playbook/pb_select/docs/_select_required_indicator.html.erb +24 -0
  36. data/app/pb_kits/playbook/pb_select/docs/_select_required_indicator.jsx +33 -0
  37. data/app/pb_kits/playbook/pb_select/docs/_select_required_indicator.md +3 -0
  38. data/app/pb_kits/playbook/pb_select/docs/example.yml +3 -2
  39. data/app/pb_kits/playbook/pb_select/docs/index.js +1 -0
  40. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_with_card_title_props.jsx +152 -0
  41. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_with_card_title_props.md +17 -0
  42. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_with_card_title_props_rails.html.erb +121 -0
  43. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_with_card_title_props_rails.md +17 -0
  44. data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
  45. data/app/pb_kits/playbook/pb_table/docs/index.js +1 -0
  46. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_disabled.jsx +11 -13
  47. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_disabled.html.erb +10 -0
  48. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_disabled.jsx +27 -0
  49. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_input_options.jsx +68 -0
  50. data/app/pb_kits/playbook/pb_textarea/docs/example.yml +3 -0
  51. data/app/pb_kits/playbook/pb_textarea/docs/index.js +10 -8
  52. data/app/pb_kits/playbook/pb_title/docs/_title_colors.html.erb +2 -0
  53. data/app/pb_kits/playbook/pb_title/docs/_title_colors.jsx +14 -0
  54. metadata +26 -2
@@ -0,0 +1 @@
1
+ TipTap (vanilla JS) kit — no React. Same editor core as the React TipTap variant; content is synced to a hidden input for Rails form submission. Use `pb_rails("rich_text_editor_tiptap", props: { input_options: { id: "...", name: "..." }, value: "..." })`.
@@ -11,6 +11,9 @@ examples:
11
11
  - rich_text_editor_inline: Inline
12
12
  - rich_text_editor_required_indicator: Required Indicator
13
13
  - rich_text_editor_preview: Preview
14
+ - rich_text_editor_tiptap_default: "TipTap (Vanilla JS)"
15
+ - rich_text_editor_quill_default: "Quill"
16
+ - rich_text_editor_lexxy_default: "Lexxy"
14
17
 
15
18
  react:
16
19
  - rich_text_editor_default: Default
@@ -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'
@@ -0,0 +1,152 @@
1
+ import React, { useState } from "react"
2
+ import { Button, Date as DateKit, DatePicker, Dropdown, Select, Table, TextInput, Typeahead, Flex } from "playbook-ui"
3
+
4
+ // Mock Data for Table
5
+ const users = [
6
+ { id: 1, name: "Jennifer", title: "Associate Scrum Master", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-01" },
7
+ { id: 2, name: "Nick", title: "UX Engineer II", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-02" },
8
+ { id: 3, name: "Nida", title: "Senior UX Engineer", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-03" },
9
+ { id: 4, name: "Justin", title: "Director of User Experience Engineering", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-04" },
10
+ { id: 5, name: "Edward", title: "UX Designer II", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-05" },
11
+ { id: 6, name: "Elisa", title: "UX Engineer", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-06" },
12
+ { id: 7, name: "Gary", title: "UX Engineer", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-07" },
13
+ { id: 8, name: "Barkley", title: "Nitro Quality Ninja", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-08" },
14
+ { id: 9, name: "Aaron", title: "Associate Nitro Quality Ninja", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-09" },
15
+ ]
16
+
17
+ const TableWithFilterWithCardTitleProps = () => {
18
+ const [territory, setTerritory] = useState("")
19
+
20
+ // --------Filter content example ------
21
+ const filterContent = ({ closePopover }) => (
22
+ <>
23
+ <TextInput
24
+ label="Territory ID"
25
+ onChange={event => setTerritory(event.target.value)}
26
+ value={territory}
27
+ />
28
+
29
+ <Typeahead
30
+ label="Title"
31
+ options={[
32
+ { key: "senior-ux-engineer", label: "Senior UX Engineer", value: "senior-ux-engineer" },
33
+ { key: "ux-engineer", label: "UX Engineer", value: "ux-engineer" },
34
+ { key: "ux-designer", label: "UX Designer", value: "ux-designer" }
35
+ ]}
36
+ />
37
+
38
+ <Select
39
+ blankSelection="All Departments"
40
+ label="Department"
41
+ options={[
42
+ { value: "Business Technology", label: "Business Technology", key: "business-technology" },
43
+ { value: "Customer Development", label: "Customer Development", key: "customer-development" },
44
+ { value: "Talent Acquisition", label: "Talent Acquisition", key: "talent-acquisition" }
45
+ ]}
46
+ />
47
+
48
+ <Dropdown
49
+ label="Branch"
50
+ options={[
51
+ { key: "Philadelphia", label: "Philadelphia", value: "philadelphia" },
52
+ { key: "New York", label: "New York", value: "new-york" },
53
+ { key: "Austin", label: "Austin", value: "austin" }
54
+ ]}
55
+ />
56
+
57
+ <DatePicker
58
+ label="Start Date"
59
+ paddingY="sm"
60
+ pickerId="startedOn"
61
+ />
62
+ <Flex spacing="between">
63
+ <Button
64
+ onClick={() => {
65
+ alert("No filtering functionality - just a pattern demo!")
66
+ closePopover()
67
+ }}
68
+ text="Filter"
69
+ />
70
+ <Button
71
+ text="Defaults"
72
+ variant="secondary"
73
+ />
74
+ </Flex>
75
+ </>
76
+ )
77
+ // -------End Filter content example ------
78
+
79
+ return (
80
+ <Table
81
+ cardProps={{marginX: {
82
+ xs: "sm",
83
+ sm: "sm",
84
+ md: "xl",
85
+ lg: "xl",
86
+ xl: "xl",
87
+ default: "xl",
88
+ }}}
89
+ filterContent={filterContent}
90
+ filterProps={{
91
+ results: 50,
92
+ sortOptions: {
93
+ territory_id: "Territory ID",
94
+ first_name: "Name",
95
+ started_on: "Start Date",
96
+ department_name: "Department",
97
+ title_name: "Title",
98
+ branch_branch_name: "Branch",
99
+ },
100
+ sortValue: [{ name: 'started_on', dir: 'asc' }],
101
+ }}
102
+ title="Table Title Here"
103
+ titleProps={{
104
+ paddingLeft:{
105
+ xs: "sm",
106
+ sm: "sm",
107
+ md: "xl",
108
+ lg: "xl",
109
+ xl: "xl",
110
+ default: "xl",
111
+ }
112
+ }}
113
+ variant="withFilter"
114
+ >
115
+ <Table.Head>
116
+ <Table.Row>
117
+ <Table.Header>{'Territory ID'}</Table.Header>
118
+ <Table.Header>{'Name'}</Table.Header>
119
+ <Table.Header>{'Title'}</Table.Header>
120
+ <Table.Header>{'Department'}</Table.Header>
121
+ <Table.Header>{'Branch'}</Table.Header>
122
+ <Table.Header textAlign="right">{'Start Date'}</Table.Header>
123
+ </Table.Row>
124
+ </Table.Head>
125
+ <Table.Body>
126
+ {users.map((user) => (
127
+ <Table.Row key={user.id}>
128
+ <Table.Cell
129
+ marginX={{ xs: "sm" }}
130
+ numberSpacing="tabular"
131
+ >
132
+ {user.id}
133
+ </Table.Cell>
134
+ <Table.Cell marginX={{ xs: "sm" }}>{user.name}</Table.Cell>
135
+ <Table.Cell marginX={{ xs: "sm" }}>{user.title}</Table.Cell>
136
+ <Table.Cell marginX={{ xs: "sm" }}>{user.department}</Table.Cell>
137
+ <Table.Cell marginX={{ xs: "sm" }}>{user.branch}</Table.Cell>
138
+ <Table.Cell marginX={{ xs: "sm" }}>
139
+ <DateKit
140
+ alignment="right"
141
+ showCurrentYear
142
+ value={user.startDate}
143
+ />
144
+ </Table.Cell>
145
+ </Table.Row>
146
+ ))}
147
+ </Table.Body>
148
+ </Table>
149
+ )
150
+ }
151
+
152
+ export default TableWithFilterWithCardTitleProps
@@ -0,0 +1,17 @@
1
+ The `withFilter` variant also offers 2 additional optional props:
2
+
3
+ `cardProps`: An object containing Card-specific props.
4
+ `titleProps`: An object containing Title-specific props.
5
+
6
+ #### Default Card Props
7
+
8
+ The Table kit automatically sets these Card defaults (which you can override via `cardProps`):
9
+
10
+ - `padding="none"`
11
+
12
+ #### Default Title Props
13
+
14
+ The Table kit automatically sets these Title defaults (which you can override via `titleProps`):
15
+
16
+ - `size={3}`
17
+ - `paddingY="md"`
@@ -0,0 +1,121 @@
1
+ <% users = [
2
+ { id: 1, name: "Jennifer", title: "Associate Scrum Master", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 1) },
3
+ { id: 2, name: "Nick", title: "UX Engineer II", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 2) },
4
+ { id: 3, name: "Nida", title: "Senior UX Engineer", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 3) },
5
+ { id: 4, name: "Justin", title: "Director of User Experience Engineering", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 4) },
6
+ { id: 5, name: "Edward", title: "UX Designer II", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 5) },
7
+ { id: 6, name: "Elisa", title: "UX Engineer", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 6) },
8
+ { id: 7, name: "Gary", title: "UX Engineer", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 7) },
9
+ { id: 8, name: "Barkley", title: "Nitro Quality Ninja", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 8) },
10
+ { id: 9, name: "Aaron", title: "Associate Nitro Quality Ninja", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 9) },
11
+ ] %>
12
+
13
+ <% filter_content =
14
+ pb_rails("text_input", props: {
15
+ label: "Territory ID",
16
+ placeholder: "Enter Territory ID"
17
+ }) +
18
+ pb_rails("typeahead", props: {
19
+ label: "Title",
20
+ options: [
21
+ { label: "Senior UX Engineer", value: "senior-ux-engineer" },
22
+ { label: "UX Engineer", value: "ux-engineer" },
23
+ { label: "UX Designer", value: "ux-designer" }
24
+ ]
25
+ }) +
26
+ pb_rails("select", props: {
27
+ blank_selection: "All Departments",
28
+ label: "Department",
29
+ options: [
30
+ { value: "Business Technology", text: "Business Technology" },
31
+ { value: "Customer Development", text: "Customer Development" },
32
+ { value: "Talent Acquisition", text: "Talent Acquisition" }
33
+ ]
34
+ }) +
35
+ pb_rails("dropdown", props: {
36
+ label: "Branch",
37
+ options: [
38
+ { label: "Philadelphia", value: "philadelphia" },
39
+ { label: "New York", value: "new-york" },
40
+ { label: "Austin", value: "austin" }
41
+ ]
42
+ }) +
43
+ pb_rails("date_picker", props: {
44
+ label: "Start Date",
45
+ padding_y: "sm",
46
+ picker_id: "startedOn"
47
+ }) +
48
+ pb_rails("flex", props: { spacing: "between" }) do
49
+ pb_rails("button", props: {
50
+ text: "Filter",
51
+ }) +
52
+ pb_rails("button", props: {
53
+ text: "Defaults",
54
+ variant: "secondary"
55
+ })
56
+ end
57
+ %>
58
+
59
+ <%= pb_rails("table", props: {
60
+ card_props: {
61
+ margin_x: {
62
+ xs: "sm",
63
+ sm: "sm",
64
+ md: "xl",
65
+ lg: "xl",
66
+ xl: "xl",
67
+ default: "xl",
68
+ }
69
+ },
70
+ variant: "with_filter",
71
+ title: "Table Title Here",
72
+ title_props: {
73
+ padding_left:{
74
+ xs: "sm",
75
+ sm: "sm",
76
+ md: "xl",
77
+ lg: "xl",
78
+ xl: "xl",
79
+ default: "xl",
80
+ }
81
+ },
82
+ filter_content: filter_content,
83
+ filter_props: {
84
+ id: "user-table-filters-1",
85
+ results: 9,
86
+ sort_menu: [
87
+ { item: "Start Date", link: "?q[sorts]=started_on+asc", active: true, direction: "asc" },
88
+ { item: "First Name", link: "?q[sorts]=name+asc", active: false },
89
+ { item: "Title", link: "?q[sorts]=title+asc", active: false },
90
+ { item: "Department", link: "?q[sorts]=department+asc", active: false },
91
+ { item: "Branch", link: "?q[sorts]=branch+asc", active: false },
92
+ { item: "Territory ID", link: "?q[sorts]=territory_id+asc", active: false },
93
+ ],
94
+ }
95
+ }) do %>
96
+ <%= pb_rails("table/table_head") do %>
97
+ <%= pb_rails("table/table_row") do %>
98
+ <%= pb_rails("table/table_header", props: { text: "Territory ID" }) %>
99
+ <%= pb_rails("table/table_header", props: { text: "Name" }) %>
100
+ <%= pb_rails("table/table_header", props: { text: "Title" }) %>
101
+ <%= pb_rails("table/table_header", props: { text: "Department" }) %>
102
+ <%= pb_rails("table/table_header", props: { text: "Branch" }) %>
103
+ <%= pb_rails("table/table_header", props: { text: "Start Date", text_align: "right" }) %>
104
+ <% end %>
105
+ <% end %>
106
+
107
+ <%= pb_rails("table/table_body") do %>
108
+ <% users.each do |user| %>
109
+ <%= pb_rails("table/table_row") do %>
110
+ <%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" }, number_spacing: "tabular" }) { user[:id].to_s } %>
111
+ <%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" } }) { user[:name] } %>
112
+ <%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" } }) { user[:title] } %>
113
+ <%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" } }) { user[:department] } %>
114
+ <%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" } }) { user[:branch] } %>
115
+ <%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" } }) do %>
116
+ <%= pb_rails("date", props: {alignment: "right", date: user[:start_date].to_s, show_current_year: true } ) %>
117
+ <% end %>
118
+ <% end %>
119
+ <% end %>
120
+ <% end %>
121
+ <% end %>
@@ -0,0 +1,17 @@
1
+ The `with_filter` variant also offers 2 additional optional props:
2
+
3
+ `card_props`: An object containing Card-specific props.
4
+ `title_props`: An object containing Title-specific props.
5
+
6
+ #### Default Card Props
7
+
8
+ The Table kit automatically sets these Card defaults (which you can override via `card_props`):
9
+
10
+ - `padding:"none"`
11
+
12
+ #### Default Title Props
13
+
14
+ The Table kit automatically sets these Title defaults (which you can override via `title_props`):
15
+
16
+ - `size:3`
17
+ - `paddingY:"md"`
@@ -42,6 +42,7 @@ examples:
42
42
  - table_with_header_style_floating: Header Style Floating
43
43
  - table_with_filter_variant_rails: Variant with Filter
44
44
  - table_with_filter_variant_with_pagination_rails: Variant with Filter and Pagination
45
+ - table_with_filter_with_card_title_props_rails: Variant with Filter (with Card and Title Props)
45
46
 
46
47
  react:
47
48
  - table_sm: Small
@@ -85,3 +86,4 @@ examples:
85
86
  - table_with_header_style_floating: Header Style Floating
86
87
  - table_with_filter_variant: Variant with Filter
87
88
  - table_with_filter_variant_with_pagination: Variant with Filter and Pagination
89
+ - table_with_filter_with_card_title_props: Variant with Filter (with Card and Title Props)
@@ -40,3 +40,4 @@ export { default as TableWithHeaderStyleBorderless } from './_table_with_header_
40
40
  export { default as TableWithHeaderStyleFloating } from './_table_with_header_style_floating.jsx'
41
41
  export { default as TableWithFilterVariant } from './_table_with_filter_variant.jsx'
42
42
  export { default as TableWithFilterVariantWithPagination } from './_table_with_filter_variant_with_pagination.jsx'
43
+ export { default as TableWithFilterWithCardTitleProps } from './_table_with_filter_with_card_title_props.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,8 +1,10 @@
1
- export { default as TextareaDefault } from './_textarea_default.jsx'
2
- export { default as TextareaResize } from './_textarea_resize.jsx'
3
- export { default as TextareaCustom } from './_textarea_custom.jsx'
4
- export { default as TextareaError } from './_textarea_error.jsx'
5
- export { default as TextareaCharacterCounter } from './_textarea_character_counter.jsx'
6
- export { default as TextareaInline } from './_textarea_inline.jsx'
7
- export { default as TextareaEmojiMask } from './_textarea_emoji_mask.jsx'
8
- export { default as TextareaRequiredIndicator } from './_textarea_required_indicator.jsx'
1
+ export { default as TextareaDefault } from "./_textarea_default.jsx"
2
+ export { default as TextareaDisabled } from './_textarea_disabled.jsx'
3
+ export { default as TextareaResize } from "./_textarea_resize.jsx"
4
+ export { default as TextareaCustom } from "./_textarea_custom.jsx"
5
+ export { default as TextareaError } from "./_textarea_error.jsx"
6
+ export { default as TextareaCharacterCounter } from "./_textarea_character_counter.jsx"
7
+ export { default as TextareaInline } from "./_textarea_inline.jsx"
8
+ export { default as TextareaEmojiMask } from "./_textarea_emoji_mask.jsx"
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}