playbook_ui_docs 16.0.0 → 16.1.0.pre.alpha.PLAY2684iconbuttonvariant14251

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 (115) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_custom.jsx +71 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_custom.md +4 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.md +2 -2
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading_rails.html.erb +64 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading_rails.md +18 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.md +1 -1
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -0
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -1
  10. data/app/pb_kits/playbook/pb_background/docs/_background_responsive.jsx +30 -0
  11. data/app/pb_kits/playbook/pb_background/docs/_background_responsive.md +1 -0
  12. data/app/pb_kits/playbook/pb_background/docs/example.yml +1 -0
  13. data/app/pb_kits/playbook/pb_background/docs/index.js +1 -0
  14. data/app/pb_kits/playbook/pb_button/docs/_button_icon_variant.html.erb +21 -0
  15. data/app/pb_kits/playbook/pb_button/docs/_button_icon_variant.jsx +180 -0
  16. data/app/pb_kits/playbook/pb_button/docs/_button_icon_variant_rails.md +1 -0
  17. data/app/pb_kits/playbook/pb_button/docs/_button_icon_variant_react.md +1 -0
  18. data/app/pb_kits/playbook/pb_button/docs/example.yml +2 -0
  19. data/app/pb_kits/playbook/pb_button/docs/index.js +1 -0
  20. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_required_indicator.html.erb +6 -0
  21. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_required_indicator.jsx +17 -0
  22. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_required_indicator.md +3 -0
  23. data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +2 -0
  24. data/app/pb_kits/playbook/pb_checkbox/docs/index.js +1 -0
  25. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default.md +1 -0
  26. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection_rails.md +3 -0
  27. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection_react.md +3 -0
  28. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_clearable.html.erb +52 -0
  29. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_clearable.jsx +72 -0
  30. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_clearable.md +5 -0
  31. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height.jsx +33 -0
  32. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height_rails.html.erb +20 -0
  33. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height_rails.md +8 -0
  34. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height_react.md +8 -0
  35. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +1 -1
  36. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.html.erb +6 -3
  37. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.jsx +1 -0
  38. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.md +3 -1
  39. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_placeholder.html.erb +9 -0
  40. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_placeholder.jsx +33 -0
  41. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_placeholder.md +3 -0
  42. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +6 -0
  43. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +4 -1
  44. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb +2 -2
  45. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx +16 -9
  46. data/app/pb_kits/playbook/pb_form/docs/_form_with_required_indicator.html.erb +7 -1
  47. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.html.erb +5 -5
  48. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text.jsx +4 -4
  49. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options.md +1 -1
  50. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_input_display.html.erb +74 -0
  51. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_input_display.jsx +87 -0
  52. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_input_display.md +3 -0
  53. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.html.erb +3 -3
  54. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.jsx +4 -7
  55. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.md +3 -0
  56. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.html.erb +135 -0
  57. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.jsx +147 -0
  58. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.md +1 -0
  59. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +35 -31
  60. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +2 -0
  61. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.html.erb +30 -0
  62. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.jsx +1 -1
  63. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.md +1 -1
  64. data/app/pb_kits/playbook/pb_multiple_users/docs/example.yml +1 -0
  65. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_disabled_item.html.erb +24 -0
  66. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_disabled_item.jsx +87 -0
  67. data/app/pb_kits/playbook/pb_nav/docs/example.yml +2 -6
  68. data/app/pb_kits/playbook/pb_nav/docs/index.js +2 -1
  69. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_meter_settings.jsx +1 -0
  70. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_required_indicator.html.erb +7 -0
  71. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_required_indicator.jsx +24 -0
  72. data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_required_indicator.md +3 -0
  73. data/app/pb_kits/playbook/pb_passphrase/docs/example.yml +2 -0
  74. data/app/pb_kits/playbook/pb_passphrase/docs/index.js +1 -0
  75. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_required_indicator.html.erb +5 -0
  76. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_required_indicator.jsx +14 -0
  77. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_required_indicator.md +3 -0
  78. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +2 -0
  79. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +1 -0
  80. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_label.jsx +44 -0
  81. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_label.md +1 -0
  82. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_required_indicator.jsx +36 -0
  83. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_required_indicator.md +3 -0
  84. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_label.jsx +28 -0
  85. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_label.md +1 -0
  86. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_required_indicator.html.erb +10 -0
  87. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_required_indicator.jsx +22 -0
  88. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_required_indicator.md +3 -0
  89. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +5 -0
  90. data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +4 -0
  91. data/app/pb_kits/playbook/pb_table/docs/_sections.yml +68 -0
  92. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_default.html.erb +3 -3
  93. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_default.jsx +3 -0
  94. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_default.md +1 -0
  95. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_input_options.html.erb +39 -0
  96. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_input_options.md +3 -0
  97. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_required_indicator.html.erb +5 -0
  98. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_required_indicator.jsx +25 -0
  99. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_required_indicator.md +3 -0
  100. data/app/pb_kits/playbook/pb_textarea/docs/example.yml +4 -1
  101. data/app/pb_kits/playbook/pb_textarea/docs/index.js +1 -0
  102. data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_on_handler.jsx +5 -2
  103. data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_required_indicator.html.erb +6 -0
  104. data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_required_indicator.jsx +16 -0
  105. data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_required_indicator.md +3 -0
  106. data/app/pb_kits/playbook/pb_time_picker/docs/example.yml +2 -0
  107. data/app/pb_kits/playbook/pb_time_picker/docs/index.js +1 -0
  108. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_required_indicator.html.erb +16 -0
  109. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_required_indicator.jsx +23 -0
  110. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_required_indicator.md +3 -0
  111. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.html.erb +1 -1
  112. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.jsx +1 -1
  113. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
  114. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +22 -21
  115. metadata +66 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f6979e6789aa5d34bb598b9fb40404ff29658c2109f118497647503414d0aa57
4
- data.tar.gz: fc1f6bfcfac4869de68fdee635d998bba02f6c75f75f05750e527957569cf755
3
+ metadata.gz: e18f62273ec925c94ff02108912de2c0ecfa5e8b4b76e44b6896cad278150d34
4
+ data.tar.gz: f5888f9e954ee60ac3046594b4c9e52999522a89a7c6e0b78dbb09b9b748c10a
5
5
  SHA512:
6
- metadata.gz: 93046e97dbb1c968907098cb73656a55fc7d25e0d43c0f915e37959e57fe745b3cdd2635c4b3403f37ca57060bdf54018c5e1e7fe3babf1fd15caa9bcbdbabac
7
- data.tar.gz: 7442bdffb6f159cc45fa7d64da4cd98df25b700fc88d470b243740e7dbc82e504d7c23ac401c475754b2794b0bd5fc2e7dd0309939397106a761158aefc3fd1c
6
+ metadata.gz: 0a3442931f98c002dc51540b8e1f39b3741670417d806f399c582e9a34011b6b43fdd9565b560503b3f52289f41586593eac4d686bcaa94c3f81583a30cabd0a
7
+ data.tar.gz: d27b7b8a40f4a07701970e69c517f99dbd296bb0cfc996e6a846d9e92a4842c68f3e5918971133afc385291adb1929bdb777bcf3a2b3171739c0f3be7eb316aa
@@ -0,0 +1,71 @@
1
+ import React from "react"
2
+ import AdvancedTable from '../_advanced_table'
3
+ import colors from '../../tokens/exports/_colors.module.scss'
4
+ import MOCK_DATA from "./advanced_table_mock_data.json"
5
+ import Flex from '../../pb_flex/_flex'
6
+ import Title from '../../pb_title/_title'
7
+ import Body from '../../pb_body/_body'
8
+
9
+
10
+ const AdvancedTableColumnStylingBackgroundCustom = (props) => {
11
+ const columnDefinitions = [
12
+ {
13
+ accessor: "year",
14
+ label: "Year",
15
+ cellAccessors: ["quarter", "month", "day"],
16
+ customRenderer: (row, value) => (
17
+ <Flex flexDirection="column">
18
+ <Title size={4}
19
+ text={value}
20
+ />
21
+ <Body text="lorem ipsum" />
22
+ <Body text="lorem ipsum" />
23
+ </Flex>
24
+ ),
25
+ },
26
+ {
27
+ accessor: "newEnrollments",
28
+ label: "New Enrollments",
29
+ columnStyling:{
30
+ cellBackgroundColor: (row) => row.original.newEnrollments > 15 ? colors.success_subtle : colors.error_subtle,
31
+ fontColor: (row) => row.original.newEnrollments > 15 ? colors.success : colors.error,
32
+ },
33
+ },
34
+ {
35
+ accessor: "scheduledMeetings",
36
+ label: "Scheduled Meetings",
37
+ columnStyling:{
38
+ cellBackgroundColor: (row) => row.original.scheduledMeetings >= 15 ? colors.info_subtle : colors.warning_subtle
39
+ },
40
+ },
41
+ {
42
+ accessor: "attendanceRate",
43
+ label: "Attendance Rate",
44
+ columnStyling:{cellBackgroundColor: colors.info, headerBackgroundColor: colors.info, fontColor: colors.white, headerFontColor: colors.white},
45
+ },
46
+ {
47
+ accessor: "completedClasses",
48
+ label: "Completed Classes",
49
+ },
50
+ {
51
+ accessor: "classCompletionRate",
52
+ label: "Class Completion Rate",
53
+ },
54
+ {
55
+ accessor: "graduatedStudents",
56
+ label: "Graduated Students",
57
+ },
58
+ ]
59
+
60
+ return (
61
+ <div>
62
+ <AdvancedTable
63
+ columnDefinitions={columnDefinitions}
64
+ tableData={MOCK_DATA}
65
+ {...props}
66
+ />
67
+ </div>
68
+ )
69
+ }
70
+
71
+ export default AdvancedTableColumnStylingBackgroundCustom
@@ -0,0 +1,4 @@
1
+ `cellBackgroundColor` and `fontColor` can also accept functions for conditional styling based on row data. The function receives the row object and returns a color value.
2
+
3
+ See the code snippet below for more details.
4
+
@@ -6,9 +6,9 @@ In the first Advanced Table in this code example, 2021 has an empty children arr
6
6
  This prop is set to `false` by default.
7
7
 
8
8
 
9
- ### persistToggleExpansion
9
+ ### persistToggleExpansionButton
10
10
  The `persistToggleExpansionButton` is a boolean prop that renders the toggle-all icon in the top left header cell for complex datasets with empty `children` arrays and advanced querying logic explained in the preceeding doc example. Your logic may require an additional query helper file to update data specifically from requerying via toggle all buttons.
11
11
 
12
12
  In the second and third Advanced Tables in this code example, all 3 rows have empty children arrays. The second Advanced Table demonstrates that the toggle all button does not render (prior to an initial row expansion) without `persistToggleExpansionButton` in place. The third Advanced Table shows the toggle all button due to `persistToggleExpansionButton`.
13
13
 
14
- This prop is set to false by default and should only be used in conjunction with `inlineRowLoading`.
14
+ This prop is set to `false` by default and should only be used in conjunction with `inlineRowLoading`.
@@ -0,0 +1,64 @@
1
+ <% column_definitions = [
2
+ {
3
+ accessor: "year",
4
+ label: "Year",
5
+ cellAccessors: ["quarter", "month", "day"],
6
+ },
7
+ {
8
+ accessor: "newEnrollments",
9
+ label: "New Enrollments",
10
+ },
11
+ {
12
+ accessor: "scheduledMeetings",
13
+ label: "Scheduled Meetings",
14
+ },
15
+ {
16
+ accessor: "attendanceRate",
17
+ label: "Attendance Rate",
18
+ },
19
+ {
20
+ accessor: "completedClasses",
21
+ label: "Completed Classes",
22
+ },
23
+ {
24
+ accessor: "classCompletionRate",
25
+ label: "Class Completion Rate",
26
+ },
27
+ {
28
+ accessor: "graduatedStudents",
29
+ label: "Graduated Students",
30
+ }
31
+ ] %>
32
+
33
+ <%= pb_rails("caption", props: { text: "Inline Row Loading - Demonstrated in Row 1 (Rows 2 and 3 have data)" }) %>
34
+
35
+ <%= pb_rails("advanced_table", props: {
36
+ id: "inline-loading-table-1",
37
+ table_data: @table_data_inline_loading,
38
+ column_definitions: column_definitions,
39
+ enable_toggle_expansion: "all",
40
+ inline_row_loading: true,
41
+ margin_bottom: "md"
42
+ }) %>
43
+
44
+ <%= pb_rails("caption", props: { text: "Inline Row Loading with No Subrow Data - All Rows Display Inline Row Loading and the Toggle All Button is not rendered" }) %>
45
+
46
+ <%= pb_rails("advanced_table", props: {
47
+ id: "inline-loading-table-2",
48
+ table_data: @table_data_inline_loading_empty_children,
49
+ column_definitions: column_definitions,
50
+ enable_toggle_expansion: "all",
51
+ inline_row_loading: true,
52
+ margin_bottom: "md"
53
+ }) %>
54
+
55
+ <%= pb_rails("caption", props: { text: "Inline Row Loading and Persist Toggle Expansion Button with No Subrow Data - All Rows Display Inline Row Loading and the Toggle All Button is rendered" }) %>
56
+
57
+ <%= pb_rails("advanced_table", props: {
58
+ id: "inline-loading-table-3",
59
+ table_data: @table_data_inline_loading_empty_children,
60
+ column_definitions: column_definitions,
61
+ enable_toggle_expansion: "all",
62
+ inline_row_loading: true,
63
+ persist_toggle_expansion_button: true
64
+ }) %>
@@ -0,0 +1,18 @@
1
+ ### inline_row_loading
2
+ By default, the kit assumes that the initial dataset is complete, rendering expansion controls only when children are present. If, however, you want to implement lazy-loading patterns where children are fetched only when a parent is expanded, use the `inline_row_loading` prop.
3
+
4
+ When `inline_row_loading` is set to `true`:
5
+ - Expansion controls are rendered for rows with empty `children` arrays (you must pass `children: []` to any row that will have children loaded later)
6
+ - When such a row is expanded, an inline loading indicator appears until the child data is loaded
7
+ - This enables lazy-loading patterns without one-off hacks
8
+
9
+ In the first table above, row "2021" has an empty `children` array. Click to expand it and see the inline loading state. Rows 2 and 3 have actual child data.
10
+
11
+ This prop is set to `false` by default.
12
+
13
+ ### persist_toggle_expansion_button
14
+ The `persist_toggle_expansion_button` is a boolean prop that renders the toggle-all icon in the top left header cell for complex datasets with empty `children` arrays and advanced querying logic explained in the preceding doc example. Your logic may require an additional query helper file to update data specifically from requerying via toggle all buttons.
15
+
16
+ In the second and third Advanced Tables in this code example, all 3 rows have empty children arrays. The second Advanced Table demonstrates that the toggle all button does not render (prior to an initial row expansion) without `persist_toggle_expansion_button` in place. The third Advanced Table shows the toggle all button due to `persist_toggle_expansion_button`.
17
+
18
+ This prop is set to `false` by default and should only be used in conjunction with `inline_row_loading`.
@@ -2,4 +2,4 @@ the `enableSorting` prop is a boolean prop set to false by default. If true, the
2
2
 
3
3
  ### sortIcon
4
4
 
5
- An optional prop, `sortIcon` allows you to customize your icon sets by passing it an array of any comma-separated pair of icon values. The first icon value will replace the kit's default icon when sort direction is desc, and the second value will replace the default icon when sort direction is asc. `sortIcon` also allows you to pass it a single icon as a string, in which case the icon will not toggle with the sort state. Default for this prop is `["arrow-up-short-wide", "arrow-down-short-wide"]`. All strings must be valid FA icons.
5
+ An optional prop, `sortIcon` allows you to customize your icon sets by passing it an array of any comma-separated pair of icon values. The first icon value will replace the kit's default icon when sort direction is desc, and the second value will replace the default icon when sort direction is asc. `sortIcon` also allows you to pass it a single icon as a string, in which case the icon will not toggle with the sort state. Default for this prop is `["arrow-up-wide-short", "arrow-down-short-wide"]`. All strings must be valid FA icons.
@@ -29,6 +29,7 @@ examples:
29
29
  - advanced_table_background_control_rails: Column Styling Background Color
30
30
  - advanced_table_background_colors_rails: Column Styling Individual Cell Background Color
31
31
  - advanced_table_column_border_color_rails: Column Group Border Color
32
+ - advanced_table_inline_row_loading_rails: Inline Row Loading
32
33
 
33
34
 
34
35
  react:
@@ -77,6 +78,7 @@ examples:
77
78
  - advanced_table_column_styling: Column Styling
78
79
  - advanced_table_column_styling_column_headers: Column Styling with Multiple Headers
79
80
  - advanced_table_column_styling_background: Column Styling Background Color
81
+ - advanced_table_column_styling_background_custom: Column Styling Background Color (Custom)
80
82
  - advanced_table_column_styling_background_multi: Column Styling Background Color with Multiple Headers
81
83
  - advanced_table_padding_control: Padding Control using Column Styling
82
84
  - advanced_table_column_border_color: Column Group Border Color
@@ -47,4 +47,5 @@ export { default as AdvancedTableSortPerColumnForMultiColumn } from './_advanced
47
47
  export { default as AdvancedTablePaddingControl } from './_advanced_table_padding_control.jsx'
48
48
  export { default as AdvancedTablePaddingControlPerRow } from './_advanced_table_padding_control_per_row.jsx'
49
49
  export { default as AdvancedTableColumnStylingBackground } from './_advanced_table_column_styling_background.jsx'
50
- export { default as AdvancedTableColumnStylingBackgroundMulti } from './_advanced_table_column_styling_background_multi.jsx'
50
+ export { default as AdvancedTableColumnStylingBackgroundMulti } from './_advanced_table_column_styling_background_multi.jsx'
51
+ export { default as AdvancedTableColumnStylingBackgroundCustom } from './_advanced_table_column_styling_background_custom.jsx'
@@ -0,0 +1,30 @@
1
+ import React from 'react'
2
+ import Background from '../../pb_background/_background'
3
+
4
+ const BackgroundResponsive = (props) => (
5
+ <>
6
+ <Background
7
+ alt="colorful background"
8
+ backgroundColor={{ xs: "primary", sm: "warning", md: "success", lg: "error", xl: "category_1" }}
9
+ className="background lazyload"
10
+ padding="xl"
11
+ {...props}
12
+ />
13
+ <br/>
14
+ <Background
15
+ alt="colorful background"
16
+ className="background lazyload"
17
+ imageUrl={{
18
+ xs: "https://unsplash.it/500/400/?image=633",
19
+ sm: "https://images.unsplash.com/photo-1528459801416-a9e53bbf4e17?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1000&q=80",
20
+ md: "https://unsplash.it/500/400/?image=633",
21
+ lg: "https://images.unsplash.com/photo-1528459801416-a9e53bbf4e17?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1000&q=80",
22
+ xl: "https://unsplash.it/500/400/?image=633"
23
+ }}
24
+ padding="xl"
25
+ {...props}
26
+ />
27
+ </>
28
+ )
29
+
30
+ export default BackgroundResponsive
@@ -0,0 +1 @@
1
+ The `backgroundColor`, `backgroundSize`, `backgroundPosition`, `backgroundRepeat`, and `imageUrl` props support responsive sizes. To use them, pass an object to the prop containing your values relative to responsive break points. To test this here, resize your browser window to responsively change these Backgrounds' `backgroundColor` and `imageUrl`.
@@ -20,3 +20,4 @@ examples:
20
20
  - background_category: Category
21
21
  - background_size: Size
22
22
  - background_overlay: Overlay
23
+ - background_responsive: Responsive
@@ -7,3 +7,4 @@ export { default as BackgroundStatusSubtle } from './_background_status_subtle.j
7
7
  export { default as BackgroundCategory } from './_background_category.jsx'
8
8
  export { default as BackgroundSize } from './_background_size.jsx'
9
9
  export { default as BackgroundOverlay } from './_background_overlay.jsx'
10
+ export { default as BackgroundResponsive } from './_background_responsive.jsx'
@@ -0,0 +1,21 @@
1
+ <%= pb_rails("caption", props: { margin_y: "md", text: "Small Size (sm)" }) %>
2
+ <%= pb_rails("button", props: { icon: "plus", size: "sm", margin_right: "lg" }) %>
3
+ <%= pb_rails("button", props: { icon: "plus", size: "sm", variant: "secondary", margin_right: "lg" }) %>
4
+ <%= pb_rails("button", props: { icon: "plus", size: "sm", variant: "link", margin_right: "lg" }) %>
5
+ <%= pb_rails("button", props: { icon: "plus", size: "sm", variant: "danger", margin_right: "lg" }) %>
6
+ <%= pb_rails("button", props: { icon: "plus", size: "sm", disabled: true, margin_right: "lg" }) %>
7
+ <%= pb_rails("button", props: { icon: "plus", size: "sm", loading: true, margin_right: "lg" }) %>
8
+ <%= pb_rails("caption", props: { margin_y: "md", text: "Medium Size (md)" }) %>
9
+ <%= pb_rails("button", props: { icon: "plus", size: "md", margin_right: "lg" }) %>
10
+ <%= pb_rails("button", props: { icon: "plus", size: "md", variant: "secondary", margin_right: "lg" }) %>
11
+ <%= pb_rails("button", props: { icon: "plus", size: "md", variant: "link", margin_right: "lg" }) %>
12
+ <%= pb_rails("button", props: { icon: "plus", size: "md", variant: "danger", margin_right: "lg" }) %>
13
+ <%= pb_rails("button", props: { icon: "plus", size: "md", disabled: true, margin_right: "lg" }) %>
14
+ <%= pb_rails("button", props: { icon: "plus", size: "md", loading: true, margin_right: "lg" }) %>
15
+ <%= pb_rails("caption", props: { margin_y: "md", text: "Large Size (lg)" }) %>
16
+ <%= pb_rails("button", props: { icon: "plus", size: "lg", margin_right: "lg" }) %>
17
+ <%= pb_rails("button", props: { icon: "plus", size: "lg", variant: "secondary", margin_right: "lg" }) %>
18
+ <%= pb_rails("button", props: { icon: "plus", size: "lg", variant: "link", margin_right: "lg" }) %>
19
+ <%= pb_rails("button", props: { icon: "plus", size: "lg", variant: "danger", margin_right: "lg" }) %>
20
+ <%= pb_rails("button", props: { icon: "plus", size: "lg", disabled: true, margin_right: "lg" }) %>
21
+ <%= pb_rails("button", props: { icon: "plus", size: "lg", loading: true, margin_right: "lg" }) %>
@@ -0,0 +1,180 @@
1
+ import React from 'react'
2
+ import Button from "../../pb_button/_button"
3
+ import Caption from "../../pb_caption/_caption"
4
+
5
+ const ButtonIconVariant = (props) => (
6
+ <div>
7
+ <Caption
8
+ marginY="md"
9
+ text="Small Size (sm)"
10
+ />
11
+ <Button
12
+ icon="plus"
13
+ marginRight='lg'
14
+ size="sm"
15
+ tabIndex={0}
16
+ {...props}
17
+ />
18
+ {' '}
19
+ <Button
20
+ icon="plus"
21
+ marginRight='lg'
22
+ size="sm"
23
+ tabIndex={0}
24
+ variant="secondary"
25
+ {...props}
26
+ />
27
+ {' '}
28
+ <Button
29
+ icon="plus"
30
+ marginRight='lg'
31
+ size="sm"
32
+ tabIndex={0}
33
+ variant="link"
34
+ {...props}
35
+ />
36
+ {' '}
37
+ <Button
38
+ icon="plus"
39
+ marginRight='lg'
40
+ size="sm"
41
+ tabIndex={0}
42
+ variant="danger"
43
+ {...props}
44
+ />
45
+ {' '}
46
+ <Button
47
+ disabled
48
+ icon="plus"
49
+ marginRight='lg'
50
+ size="sm"
51
+ tabIndex={0}
52
+ {...props}
53
+ />
54
+ {' '}
55
+ <Button
56
+ icon="plus"
57
+ loading
58
+ marginRight='lg'
59
+ size="sm"
60
+ tabIndex={0}
61
+ {...props}
62
+ />
63
+ <br/>
64
+ <Caption
65
+ marginY="md"
66
+ text="Medium Size (md)"
67
+ />
68
+ <Button
69
+ icon="plus"
70
+ marginRight='lg'
71
+ size="md"
72
+ tabIndex={0}
73
+ {...props}
74
+ />
75
+ {' '}
76
+ <Button
77
+ icon="plus"
78
+ marginRight='lg'
79
+ size="md"
80
+ tabIndex={0}
81
+ variant="secondary"
82
+ {...props}
83
+ />
84
+ {' '}
85
+ <Button
86
+ icon="plus"
87
+ marginRight='lg'
88
+ size="md"
89
+ tabIndex={0}
90
+ variant="link"
91
+ {...props}
92
+ />
93
+ {' '}
94
+ <Button
95
+ icon="plus"
96
+ marginRight='lg'
97
+ size="md"
98
+ tabIndex={0}
99
+ variant="danger"
100
+ {...props}
101
+ />
102
+ {' '}
103
+ <Button
104
+ disabled
105
+ icon="plus"
106
+ marginRight='lg'
107
+ size="md"
108
+ tabIndex={0}
109
+ {...props}
110
+ />
111
+ {' '}
112
+ <Button
113
+ icon="plus"
114
+ loading
115
+ marginRight='lg'
116
+ size="md"
117
+ tabIndex={0}
118
+ {...props}
119
+ />
120
+ <br/>
121
+ <Caption
122
+ marginY="md"
123
+ text="Large Size (lg)"
124
+ />
125
+ <Button
126
+ icon="plus"
127
+ marginRight='lg'
128
+ size="lg"
129
+ tabIndex={0}
130
+ {...props}
131
+ />
132
+ {' '}
133
+ <Button
134
+ icon="plus"
135
+ marginRight='lg'
136
+ size="lg"
137
+ tabIndex={0}
138
+ variant="secondary"
139
+ {...props}
140
+ />
141
+ {' '}
142
+ <Button
143
+ icon="plus"
144
+ marginRight='lg'
145
+ size="lg"
146
+ tabIndex={0}
147
+ variant="link"
148
+ {...props}
149
+ />
150
+ {' '}
151
+ <Button
152
+ icon="plus"
153
+ marginRight='lg'
154
+ size="lg"
155
+ tabIndex={0}
156
+ variant="danger"
157
+ {...props}
158
+ />
159
+ {' '}
160
+ <Button
161
+ disabled
162
+ icon="plus"
163
+ marginRight='lg'
164
+ size="lg"
165
+ tabIndex={0}
166
+ {...props}
167
+ />
168
+ {' '}
169
+ <Button
170
+ icon="plus"
171
+ loading
172
+ marginRight='lg'
173
+ size="lg"
174
+ tabIndex={0}
175
+ {...props}
176
+ />
177
+ </div>
178
+ )
179
+
180
+ export default ButtonIconVariant
@@ -0,0 +1 @@
1
+ The icon button variant automatically renders when you provide an `icon` prop without a corresponding `text` prop. The button will only display an icon (no text) and will be wrapped with the icon button styling. This works with all button variants including "link", "primary", "secondary", etc. Simply use `<%= pb_rails("button", props: { icon: "plus", variant: "secondary" }) %>` to get an icon button.
@@ -0,0 +1 @@
1
+ The icon button variant automatically renders when you provide an `icon` prop without a corresponding `text` prop. The button will only display an icon (no text) and will be wrapped with the icon button styling. This works with all button variants including "link", "primary", "secondary", etc. Simply use `<Button icon="rocket" variant="primary" />` to get an icon button.
@@ -13,6 +13,7 @@ examples:
13
13
  - button_form: Button Form Attribute
14
14
  - button_managed_disabled: Button Toggle Disabled State
15
15
  - button_managed_disabled_helper: Button Toggle Disabled State Helper
16
+ - button_icon_variant: Icon Button Variant
16
17
 
17
18
  react:
18
19
  - button_default: Button Variants
@@ -27,6 +28,7 @@ examples:
27
28
  - button_size: Button Size
28
29
  - button_form: Button Form Attribute
29
30
  - button_hover: Button Hover
31
+ - button_icon_variant: Icon Button Variant
30
32
 
31
33
  swift:
32
34
  - button_default_swift: Button Variants
@@ -4,6 +4,7 @@ export { default as ButtonLink } from './_button_link.jsx'
4
4
  export { default as ButtonLoading } from './_button_loading.jsx'
5
5
  export { default as ButtonBlockContent } from './_button_block_content.jsx'
6
6
  export { default as ButtonIconOptions } from './_button_icon_options.jsx'
7
+ export { default as ButtonIconVariant } from './_button_icon_variant.jsx'
7
8
  export { default as ButtonAccessibility } from './_button_accessibility.jsx'
8
9
  export { default as ButtonOptions } from './_button_options.jsx'
9
10
  export { default as ButtonSize } from './_button_size.jsx'
@@ -0,0 +1,6 @@
1
+ <%= pb_rails("checkbox" , props: {
2
+ required_indicator: true,
3
+ text: "Checkbox Label",
4
+ value: "checkbox-value",
5
+ name: "checkbox-name"
6
+ }) %>
@@ -0,0 +1,17 @@
1
+ import React from 'react'
2
+ import Checkbox from '../_checkbox'
3
+
4
+ const CheckboxRequiredIndicator = () => {
5
+ return (
6
+ <div>
7
+ <Checkbox
8
+ name="checkbox-name"
9
+ requiredIndicator
10
+ text="Checkbox label"
11
+ value="check-box value"
12
+ />
13
+ </div>
14
+ )
15
+ }
16
+
17
+ export default CheckboxRequiredIndicator
@@ -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.
@@ -8,6 +8,7 @@ examples:
8
8
  - checkbox_indeterminate: Indeterminate Checkbox
9
9
  - checkbox_disabled: Disabled Checkbox
10
10
  - checkbox_form: Form and Hidden Input
11
+ # - checkbox_required_indicator: Required Indicator
11
12
 
12
13
  react:
13
14
  - checkbox_default: Default
@@ -17,6 +18,7 @@ examples:
17
18
  - checkbox_error: Default w/ Error
18
19
  - checkbox_indeterminate: Indeterminate Checkbox
19
20
  - checkbox_disabled: Disabled Checkbox
21
+ # - checkbox_required_indicator: Required Indicator
20
22
 
21
23
  swift:
22
24
  - checkbox_default_swift: Default
@@ -5,3 +5,4 @@ export { default as CheckboxError } from './_checkbox_error.jsx'
5
5
  export { default as CheckboxChecked } from './_checkbox_checked.jsx'
6
6
  export { default as CheckboxIndeterminate } from './_checkbox_indeterminate.jsx'
7
7
  export { default as CheckboxDisabled } from './_checkbox_disabled.jsx'
8
+ export { default as CheckboxRequiredIndicator } from './_checkbox_required_indicator.jsx'
@@ -0,0 +1 @@
1
+ `pickerId`/`picker_id` is a **required prop** to instantiate the Date Picker. The presence of `pickerId`/`picker_id` in your Date Picker also associates the label with the input, providing the ability to focus the Date Picker by clicking the label.
@@ -0,0 +1,3 @@
1
+ The `blank_selection` prop adds a blank option at the top of the dropdown options list. This allows users to explicitly clear their selection by choosing the blank option.
2
+
3
+ The blank selection option appears as the first item in the dropdown and has an empty value (`id: ""`, `value: ""`). When selected, it effectively clears the dropdown selection.
@@ -0,0 +1,3 @@
1
+ The `blankSelection` prop adds a blank option at the top of the dropdown options list. This allows users to explicitly clear their selection by choosing the blank option.
2
+
3
+ The blank selection option appears as the first item in the dropdown and has an empty value (`id: ""`, `value: ""`). When selected, it effectively clears the dropdown selection.
@@ -0,0 +1,52 @@
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("dropdown", props: {
10
+ id: "date-range-quickpick-reset-closeable",
11
+ label: "Quick Pick",
12
+ variant: "quickpick",
13
+ clearable: false
14
+ }) %>
15
+
16
+ <%= pb_rails("button", props: {
17
+ margin_y: "md",
18
+ text: "Reset",
19
+ html_options: {
20
+ onclick: "handleReset()"
21
+ }
22
+ }) %>
23
+
24
+ <%= pb_rails("dropdown", props: {
25
+ id: "closeable-default",
26
+ options: options,
27
+ clearable: false,
28
+ default_value: options.last,
29
+ margin_bottom: "md",
30
+ label: "Default"
31
+ }) %>
32
+
33
+ <%= pb_rails("dropdown", props: {
34
+ id: "closeable-subtle",
35
+ options: options,
36
+ clearable: false,
37
+ default_value: options.second,
38
+ variant: "subtle",
39
+ separators: false,
40
+ label: "Subtle"
41
+ }) %>
42
+
43
+ <script>
44
+ function handleReset() {
45
+ const dropdown = document.querySelector("#date-range-quickpick-reset-closeable[data-pb-dropdown]");
46
+ const instance = dropdown?._pbDropdownInstance;
47
+
48
+ if (instance) {
49
+ instance.clearSelection();
50
+ }
51
+ }
52
+ </script>