playbook_ui 14.10.0.pre.alpha.play16825301 → 14.10.0.pre.rc.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/_playbook.scss +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx +6 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +19 -32
- data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableBody.tsx +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +6 -46
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +36 -94
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +1 -8
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -8
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +0 -4
- data/app/pb_kits/playbook/pb_advanced_table/index.js +92 -185
- data/app/pb_kits/playbook/pb_advanced_table/table_body.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +8 -57
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +13 -18
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -78
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +3 -12
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +2 -15
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +6 -10
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +4 -8
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +2 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.scss +9 -11
- data/app/pb_kits/playbook/pb_badge/_badge.scss +2 -4
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.jsx +49 -53
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb +36 -29
- data/app/pb_kits/playbook/pb_body/_body.scss +13 -14
- data/app/pb_kits/playbook/pb_body/_body_mixins.scss +16 -22
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.scss +1 -3
- data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +0 -6
- data/app/pb_kits/playbook/pb_button/_button.scss +1 -3
- data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +1 -2
- data/app/pb_kits/playbook/pb_card/_card.scss +3 -21
- data/app/pb_kits/playbook/pb_card/_card.tsx +7 -7
- data/app/pb_kits/playbook/pb_card/_card_mixin.scss +2 -2
- data/app/pb_kits/playbook/pb_card/docs/_card_header.html.erb +1 -39
- data/app/pb_kits/playbook/pb_card/docs/_card_header.jsx +0 -90
- data/app/pb_kits/playbook/pb_card/docs/_card_header.md +1 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.scss +2 -4
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +0 -3
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +0 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.html.erb +0 -8
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.jsx +0 -9
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +4 -9
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.tsx +2 -2
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +2 -2
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss +1 -3
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_overrides.scss +3 -5
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +4 -6
- data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.scss +2 -4
- data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +2 -2
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +8 -10
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.scss +0 -5
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +17 -31
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_accept.jsx +1 -3
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_description.jsx +1 -4
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_max_size.jsx +1 -1
- data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +2 -8
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +2 -11
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +4 -6
- data/app/pb_kits/playbook/pb_gauge/_gauge.scss +1 -31
- data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +3 -3
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +5 -25
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +1 -17
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.html.erb +1 -17
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.jsx +0 -15
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.md +1 -2
- data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +1 -15
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss +14 -4
- data/app/pb_kits/playbook/pb_label_value/_label_value.scss +2 -4
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +11 -30
- data/app/pb_kits/playbook/pb_link/_link.scss +3 -3
- data/app/pb_kits/playbook/pb_message/_message_mixins.scss +1 -3
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +1 -3
- data/app/pb_kits/playbook/pb_nav/_bold_mixin.scss +1 -11
- data/app/pb_kits/playbook/pb_nav/_collapsible_nav.scss +2 -16
- data/app/pb_kits/playbook/pb_nav/_vertical_nav.scss +1 -1
- data/app/pb_kits/playbook/pb_pagination/_pagination.tsx +2 -2
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +3 -5
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +8 -10
- data/app/pb_kits/playbook/pb_pill/_pill.scss +2 -4
- data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.scss +2 -4
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +2 -4
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +1 -64
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +1 -3
- data/app/pb_kits/playbook/pb_section_separator/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_section_separator/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_section_separator/section_separator.rb +1 -4
- data/app/pb_kits/playbook/pb_select/_select.scss +3 -5
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +7 -9
- data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +1 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading.scss +2 -2
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.jsx +2 -8
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/example.yml +3 -9
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.html.erb +12 -8
- data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.rb +1 -48
- data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +36 -44
- data/app/pb_kits/playbook/pb_stat_change/stat_change.html.erb +4 -4
- data/app/pb_kits/playbook/pb_table/_table.tsx +24 -80
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md +1 -4
- data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -9
- data/app/pb_kits/playbook/pb_table/docs/index.js +0 -7
- data/app/pb_kits/playbook/pb_table/index.ts +26 -102
- data/app/pb_kits/playbook/pb_table/styles/_all.scss +1 -2
- data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +2 -63
- data/app/pb_kits/playbook/pb_table/styles/_sticky_columns.scss +4 -17
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +1 -106
- data/app/pb_kits/playbook/pb_table/table.html.erb +2 -8
- data/app/pb_kits/playbook/pb_table/table.rb +2 -21
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +1 -3
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +4 -43
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_text_input/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_text_input/text_input.test.js +2 -219
- data/app/pb_kits/playbook/pb_textarea/_textarea.scss +1 -3
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +4 -5
- data/app/pb_kits/playbook/pb_timeline/_timeline.scss +2 -4
- data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +5 -5
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.html.erb +5 -4
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.jsx +4 -4
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.md +1 -1
- data/app/pb_kits/playbook/pb_timeline/timeline.rb +6 -6
- data/app/pb_kits/playbook/pb_title/_title.scss +5 -6
- data/app/pb_kits/playbook/pb_title/_title_mixin.scss +0 -13
- data/app/pb_kits/playbook/pb_toggle/_toggle.scss +3 -5
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +46 -115
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +2 -9
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +2 -3
- data/app/pb_kits/playbook/tokens/_titles.scss +8 -0
- data/app/pb_kits/playbook/utilities/_hover.scss +2 -11
- data/app/pb_kits/playbook/utilities/globalPropNames.mjs +0 -1
- data/app/pb_kits/playbook/utilities/globalProps.ts +9 -20
- data/app/pb_kits/playbook/utilities/test/globalProps/hover.test.js +0 -15
- data/dist/chunks/_typeahead-B8fkIeXA.js +22 -0
- data/dist/chunks/_weekday_stacked-CiL8BjKa.js +45 -0
- data/dist/chunks/{lib-B7sgJtGS.js → lib-SyD3buPZ.js} +3 -3
- data/dist/chunks/{pb_form_validation-C5Cc0-1v.js → pb_form_validation-Dt8UJgrJ.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +2 -2
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/classnames.rb +0 -1
- data/lib/playbook/hover.rb +1 -7
- data/lib/playbook/spacing.rb +0 -21
- data/lib/playbook/version.rb +2 -2
- metadata +8 -59
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.html.erb +0 -36
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.html.erb +0 -43
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.jsx +0 -60
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.html.erb +0 -58
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.jsx +0 -74
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -50
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +0 -57
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md +0 -5
- data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_pagination_mock_data.json +0 -5600
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.md +0 -1
- data/app/pb_kits/playbook/pb_form_group/_error_state_mixin.scss +0 -57
- data/app/pb_kits/playbook/pb_home_address_street/none_emphasis.html.erb +0 -32
- data/app/pb_kits/playbook/pb_home_address_street/none_emphasis.rb +0 -29
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.html.erb +0 -10
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.jsx +0 -42
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.md +0 -3
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_description.md +0 -3
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius.html.erb +0 -9
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius_rails.md +0 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_color.html.erb +0 -7
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_filter.html.erb +0 -119
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_filter.jsx +0 -174
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.html.erb +0 -15
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width_rails.md +0 -3
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.html.erb +0 -3
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_user.html.erb +0 -63
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_user.jsx +0 -97
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.jsx +0 -88
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_react.md +0 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.html.erb +0 -77
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +0 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.jsx +0 -87
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_react.md +0 -5
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +0 -75
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.jsx +0 -108
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.md +0 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.jsx +0 -94
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.md +0 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.jsx +0 -83
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.md +0 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.jsx +0 -120
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md +0 -1
- data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +0 -35
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.jsx +0 -106
- data/app/pb_kits/playbook/pb_text_input/inputMask.ts +0 -108
- data/app/pb_kits/playbook/utilities/_gap.scss +0 -29
- data/dist/chunks/_typeahead-C2iCBqxQ.js +0 -36
- data/dist/chunks/_weekday_stacked-CWnbnW7m.js +0 -45
- /data/app/pb_kits/playbook/pb_skeleton_loading/docs/{_skeleton_loading_border_radius_react.md → _skeleton_loading_border_radius.md} +0 -0
- /data/app/pb_kits/playbook/pb_skeleton_loading/docs/{_skeleton_loading_height_width_react.md → _skeleton_loading_height_width.md} +0 -0
@@ -1,83 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { Table, Background, Icon } from 'playbook-ui'
|
3
|
-
|
4
|
-
const TableWithCollapsibleWithNestedRows = (props) => {
|
5
|
-
|
6
|
-
const Content = () => {
|
7
|
-
return (
|
8
|
-
<Table
|
9
|
-
borderRadius="none"
|
10
|
-
container={false}
|
11
|
-
size="sm"
|
12
|
-
{...props}
|
13
|
-
>
|
14
|
-
<Background tag="tr"
|
15
|
-
{...props}
|
16
|
-
>
|
17
|
-
<Table.Cell>Expanded</Table.Cell>
|
18
|
-
<Table.Cell>Expanded</Table.Cell>
|
19
|
-
<Table.Cell>Expanded</Table.Cell>
|
20
|
-
<Table.Cell>Expanded</Table.Cell>
|
21
|
-
<Table.Cell>Expanded</Table.Cell>
|
22
|
-
</Background>
|
23
|
-
</Table>
|
24
|
-
);
|
25
|
-
};
|
26
|
-
|
27
|
-
return (
|
28
|
-
<Table
|
29
|
-
size="sm"
|
30
|
-
{...props}
|
31
|
-
>
|
32
|
-
<Table.Head>
|
33
|
-
<Table.Row>
|
34
|
-
<Table.Header>{'Column 1'}</Table.Header>
|
35
|
-
<Table.Header>{'Column 2'}</Table.Header>
|
36
|
-
<Table.Header>{'Column 3'}</Table.Header>
|
37
|
-
<Table.Header>{'Column 4'}</Table.Header>
|
38
|
-
<Table.Header>{'Column 5'}</Table.Header>
|
39
|
-
<Table.Header>{''}</Table.Header>
|
40
|
-
</Table.Row>
|
41
|
-
|
42
|
-
</Table.Head>
|
43
|
-
<Table.Body>
|
44
|
-
<Table.Row collapsible
|
45
|
-
collapsibleContent={<Content/>}
|
46
|
-
collapsibleSideHighlight={false}
|
47
|
-
>
|
48
|
-
<Table.Cell>{'Value 1'}</Table.Cell>
|
49
|
-
<Table.Cell>{'Value 2'}</Table.Cell>
|
50
|
-
<Table.Cell>{'Value 3'}</Table.Cell>
|
51
|
-
<Table.Cell>{'Value 4'}</Table.Cell>
|
52
|
-
<Table.Cell>{'Value 5'}</Table.Cell>
|
53
|
-
<Table.Cell textAlign="right">{
|
54
|
-
<Icon
|
55
|
-
color="primary"
|
56
|
-
fixedWidth
|
57
|
-
icon="chevron-down"
|
58
|
-
/>}
|
59
|
-
</Table.Cell>
|
60
|
-
|
61
|
-
</Table.Row>
|
62
|
-
<Table.Row>
|
63
|
-
<Table.Cell>{'Value 1'}</Table.Cell>
|
64
|
-
<Table.Cell>{'Value 2'}</Table.Cell>
|
65
|
-
<Table.Cell>{'Value 3'}</Table.Cell>
|
66
|
-
<Table.Cell>{'Value 4'}</Table.Cell>
|
67
|
-
<Table.Cell>{'Value 5'}</Table.Cell>
|
68
|
-
<Table.Cell>{''}</Table.Cell>
|
69
|
-
</Table.Row>
|
70
|
-
<Table.Row>
|
71
|
-
<Table.Cell>{'Value 1'}</Table.Cell>
|
72
|
-
<Table.Cell>{'Value 2'}</Table.Cell>
|
73
|
-
<Table.Cell>{'Value 3'}</Table.Cell>
|
74
|
-
<Table.Cell>{'Value 4'}</Table.Cell>
|
75
|
-
<Table.Cell>{'Value 5'}</Table.Cell>
|
76
|
-
<Table.Cell>{''}</Table.Cell>
|
77
|
-
</Table.Row>
|
78
|
-
</Table.Body>
|
79
|
-
</Table>
|
80
|
-
)
|
81
|
-
}
|
82
|
-
|
83
|
-
export default TableWithCollapsibleWithNestedRows
|
@@ -1,120 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import {Pill, Background, Table, Icon} from "playbook-ui"
|
3
|
-
|
4
|
-
const TableWithCollapsibleWithNestedTable = (props) => {
|
5
|
-
|
6
|
-
const Content = () => {
|
7
|
-
return (
|
8
|
-
<Table
|
9
|
-
borderRadius="none"
|
10
|
-
container={false}
|
11
|
-
size="sm"
|
12
|
-
{...props}
|
13
|
-
>
|
14
|
-
<Table.Head>
|
15
|
-
<Background
|
16
|
-
tag="tr"
|
17
|
-
{...props}
|
18
|
-
>
|
19
|
-
<Table.Header>{"Alt Header"}</Table.Header>
|
20
|
-
<Table.Header>{"Alt Header"}</Table.Header>
|
21
|
-
<Table.Header>{"Alt Header"}</Table.Header>
|
22
|
-
<Table.Header>{"Alt Header"}</Table.Header>
|
23
|
-
</Background>
|
24
|
-
</Table.Head>
|
25
|
-
<Table.Body>
|
26
|
-
<Table.Row>
|
27
|
-
<Table.Cell>{"Expanded"}</Table.Cell>
|
28
|
-
<Table.Cell>{"Expanded"}</Table.Cell>
|
29
|
-
<Table.Cell>{"Expanded"}</Table.Cell>
|
30
|
-
<Table.Cell>
|
31
|
-
<Pill text="Pill"
|
32
|
-
variant="primary"
|
33
|
-
{...props}
|
34
|
-
/>
|
35
|
-
</Table.Cell>
|
36
|
-
</Table.Row>
|
37
|
-
<Table.Row>
|
38
|
-
<Table.Cell>{"Expanded"}</Table.Cell>
|
39
|
-
<Table.Cell>{"Expanded"}</Table.Cell>
|
40
|
-
<Table.Cell>{"Expanded"}</Table.Cell>
|
41
|
-
<Table.Cell>
|
42
|
-
<Pill text="Pill"
|
43
|
-
variant="primary"
|
44
|
-
{...props}
|
45
|
-
/>
|
46
|
-
</Table.Cell>
|
47
|
-
</Table.Row>
|
48
|
-
<Table.Row>
|
49
|
-
<Table.Cell>{"Expanded"}</Table.Cell>
|
50
|
-
<Table.Cell>{"Expanded"}</Table.Cell>
|
51
|
-
<Table.Cell>{"Expanded"}</Table.Cell>
|
52
|
-
<Table.Cell>
|
53
|
-
<Pill text="Pill"
|
54
|
-
variant="primary"
|
55
|
-
{...props}
|
56
|
-
/>
|
57
|
-
</Table.Cell>
|
58
|
-
</Table.Row>
|
59
|
-
</Table.Body>
|
60
|
-
</Table>
|
61
|
-
);
|
62
|
-
};
|
63
|
-
|
64
|
-
return (
|
65
|
-
<Table
|
66
|
-
size="sm"
|
67
|
-
{...props}
|
68
|
-
>
|
69
|
-
<Table.Head>
|
70
|
-
<Table.Row>
|
71
|
-
<Table.Header>{'Column 1'}</Table.Header>
|
72
|
-
<Table.Header>{'Column 2'}</Table.Header>
|
73
|
-
<Table.Header>{'Column 3'}</Table.Header>
|
74
|
-
<Table.Header>{'Column 4'}</Table.Header>
|
75
|
-
<Table.Header>{'Column 5'}</Table.Header>
|
76
|
-
<Table.Header>{''}</Table.Header>
|
77
|
-
</Table.Row>
|
78
|
-
|
79
|
-
</Table.Head>
|
80
|
-
<Table.Body>
|
81
|
-
<Table.Row collapsible
|
82
|
-
collapsibleContent={<Content/>}
|
83
|
-
collapsibleSideHighlight={false}
|
84
|
-
>
|
85
|
-
<Table.Cell>{'Value 1'}</Table.Cell>
|
86
|
-
<Table.Cell>{'Value 2'}</Table.Cell>
|
87
|
-
<Table.Cell>{'Value 3'}</Table.Cell>
|
88
|
-
<Table.Cell>{'Value 4'}</Table.Cell>
|
89
|
-
<Table.Cell>{'Value 5'}</Table.Cell>
|
90
|
-
<Table.Cell textAlign="right">{
|
91
|
-
<Icon
|
92
|
-
color="primary"
|
93
|
-
fixedWidth
|
94
|
-
icon="chevron-down"
|
95
|
-
/>}
|
96
|
-
</Table.Cell>
|
97
|
-
|
98
|
-
</Table.Row>
|
99
|
-
<Table.Row>
|
100
|
-
<Table.Cell>{'Value 1'}</Table.Cell>
|
101
|
-
<Table.Cell>{'Value 2'}</Table.Cell>
|
102
|
-
<Table.Cell>{'Value 3'}</Table.Cell>
|
103
|
-
<Table.Cell>{'Value 4'}</Table.Cell>
|
104
|
-
<Table.Cell>{'Value 5'}</Table.Cell>
|
105
|
-
<Table.Cell>{''}</Table.Cell>
|
106
|
-
</Table.Row>
|
107
|
-
<Table.Row>
|
108
|
-
<Table.Cell>{'Value 1'}</Table.Cell>
|
109
|
-
<Table.Cell>{'Value 2'}</Table.Cell>
|
110
|
-
<Table.Cell>{'Value 3'}</Table.Cell>
|
111
|
-
<Table.Cell>{'Value 4'}</Table.Cell>
|
112
|
-
<Table.Cell>{'Value 5'}</Table.Cell>
|
113
|
-
<Table.Cell>{''}</Table.Cell>
|
114
|
-
</Table.Row>
|
115
|
-
</Table.Body>
|
116
|
-
</Table>
|
117
|
-
)
|
118
|
-
}
|
119
|
-
|
120
|
-
export default TableWithCollapsibleWithNestedTable
|
@@ -1 +0,0 @@
|
|
1
|
-
The `collapsibleContent` can also be used to display nested Tables within each Row.
|
@@ -1,35 +0,0 @@
|
|
1
|
-
@import "../../tokens/colors";
|
2
|
-
|
3
|
-
.table_collapsible_side_highlight {
|
4
|
-
border-left: 4px solid $primary;
|
5
|
-
&.dark {
|
6
|
-
border-left: 4px solid $active_dark;
|
7
|
-
}
|
8
|
-
}
|
9
|
-
|
10
|
-
[class^="pb_table"] {
|
11
|
-
&.table-sm,
|
12
|
-
&.table-md,
|
13
|
-
&.table-lg {
|
14
|
-
&.table-card {
|
15
|
-
tbody,
|
16
|
-
.pb_table_tbody {
|
17
|
-
tr,
|
18
|
-
.pb_table_tr {
|
19
|
-
&.collapsible_table_row {
|
20
|
-
td,
|
21
|
-
.pb_table_td {
|
22
|
-
border-bottom-color: transparent;
|
23
|
-
}
|
24
|
-
&:hover {
|
25
|
-
td,
|
26
|
-
.pb_table_td {
|
27
|
-
border-bottom-color: darken($border_light, 10%);
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
31
|
-
}
|
32
|
-
}
|
33
|
-
}
|
34
|
-
}
|
35
|
-
}
|
@@ -1,106 +0,0 @@
|
|
1
|
-
import React, { useState } from 'react'
|
2
|
-
|
3
|
-
import Caption from '../../pb_caption/_caption'
|
4
|
-
import TextInput from '../../pb_text_input/_text_input'
|
5
|
-
import Title from '../../pb_title/_title'
|
6
|
-
|
7
|
-
const TextInputMask = (props) => {
|
8
|
-
const [ssn, setSSN] = useState('')
|
9
|
-
const handleOnChangeSSN = ({ target }) => {
|
10
|
-
setSSN(target.value)
|
11
|
-
}
|
12
|
-
const ref = React.createRef()
|
13
|
-
|
14
|
-
const [formFields, setFormFields] = useState({
|
15
|
-
currency: '',
|
16
|
-
zipCode: '',
|
17
|
-
postalCode: '',
|
18
|
-
ssn: '',
|
19
|
-
creditCard: '',
|
20
|
-
cvv: ''
|
21
|
-
})
|
22
|
-
|
23
|
-
const handleOnChangeFormField = ({ target }) => {
|
24
|
-
const { name, value } = target
|
25
|
-
setFormFields({ ...formFields, [name]: value })
|
26
|
-
}
|
27
|
-
|
28
|
-
return (
|
29
|
-
<div>
|
30
|
-
<TextInput
|
31
|
-
label="Currency"
|
32
|
-
mask="currency"
|
33
|
-
name="currency"
|
34
|
-
onChange={handleOnChangeFormField}
|
35
|
-
value={formFields.currency}
|
36
|
-
{...props}
|
37
|
-
/>
|
38
|
-
<TextInput
|
39
|
-
label="Zip Code"
|
40
|
-
mask="zipCode"
|
41
|
-
name="zipCode"
|
42
|
-
onChange={handleOnChangeFormField}
|
43
|
-
value={formFields.zipCode}
|
44
|
-
{...props}
|
45
|
-
/>
|
46
|
-
<TextInput
|
47
|
-
label="Postal Code"
|
48
|
-
mask="postalCode"
|
49
|
-
name="postalCode"
|
50
|
-
onChange={handleOnChangeFormField}
|
51
|
-
value={formFields.postalCode}
|
52
|
-
{...props}
|
53
|
-
/>
|
54
|
-
<TextInput
|
55
|
-
label="SSN"
|
56
|
-
mask="ssn"
|
57
|
-
name="ssn"
|
58
|
-
onChange={handleOnChangeFormField}
|
59
|
-
value={formFields.ssn}
|
60
|
-
{...props}
|
61
|
-
/>
|
62
|
-
<TextInput
|
63
|
-
label="Credit Card"
|
64
|
-
mask="creditCard"
|
65
|
-
name="creditCard"
|
66
|
-
onChange={handleOnChangeFormField}
|
67
|
-
value={formFields.creditCard}
|
68
|
-
{...props}
|
69
|
-
/>
|
70
|
-
<TextInput
|
71
|
-
label="CVV"
|
72
|
-
mask="cvv"
|
73
|
-
name="cvv"
|
74
|
-
onChange={handleOnChangeFormField}
|
75
|
-
value={formFields.cvv}
|
76
|
-
{...props}
|
77
|
-
/>
|
78
|
-
|
79
|
-
<br />
|
80
|
-
<br />
|
81
|
-
|
82
|
-
<Title>{'Event Handler Props'}</Title>
|
83
|
-
|
84
|
-
<br />
|
85
|
-
<Caption>{'onChange'}</Caption>
|
86
|
-
|
87
|
-
<br />
|
88
|
-
|
89
|
-
<TextInput
|
90
|
-
label="SSN"
|
91
|
-
mask="ssn"
|
92
|
-
onChange={handleOnChangeSSN}
|
93
|
-
placeholder="Enter SSN"
|
94
|
-
ref={ref}
|
95
|
-
value={ssn}
|
96
|
-
{...props}
|
97
|
-
/>
|
98
|
-
|
99
|
-
{ssn !== '' && (
|
100
|
-
<React.Fragment>{`SSN is: ${ssn}`}</React.Fragment>
|
101
|
-
)}
|
102
|
-
</div>
|
103
|
-
)
|
104
|
-
}
|
105
|
-
|
106
|
-
export default TextInputMask
|
@@ -1,108 +0,0 @@
|
|
1
|
-
type InputMask = {
|
2
|
-
format: (value: string) => string
|
3
|
-
formatDefaultValue: (value: string) => string
|
4
|
-
pattern: string
|
5
|
-
placeholder: string
|
6
|
-
}
|
7
|
-
|
8
|
-
type InputMaskDictionary = {
|
9
|
-
[key in 'currency' | 'zipCode' | 'postalCode' | 'ssn' | 'creditCard' | 'cvv']: InputMask
|
10
|
-
}
|
11
|
-
|
12
|
-
const formatCurrencyDefaultValue = (value: string): string => {
|
13
|
-
// Remove non-numeric characters except for the decimal point
|
14
|
-
const numericValue = value.replace(/[^0-9.]/g, '')
|
15
|
-
|
16
|
-
if (!numericValue) return ''
|
17
|
-
|
18
|
-
// Parse the numeric value as a float to handle decimals
|
19
|
-
const dollars = parseFloat(numericValue)
|
20
|
-
if (isNaN(dollars) || dollars === 0) return ''
|
21
|
-
|
22
|
-
// Format as currency
|
23
|
-
return new Intl.NumberFormat('en-US', {
|
24
|
-
style: 'currency',
|
25
|
-
currency: 'USD',
|
26
|
-
maximumFractionDigits: 2,
|
27
|
-
}).format(dollars)
|
28
|
-
}
|
29
|
-
|
30
|
-
const formatCurrency = (value: string): string => {
|
31
|
-
const numericValue = value.replace(/[^0-9]/g, '').slice(0, 15)
|
32
|
-
|
33
|
-
if (!numericValue) return ''
|
34
|
-
|
35
|
-
const dollars = parseFloat((parseInt(numericValue) / 100).toFixed(2))
|
36
|
-
if (dollars === 0) return ''
|
37
|
-
|
38
|
-
return new Intl.NumberFormat('en-US', {
|
39
|
-
style: 'currency',
|
40
|
-
currency: 'USD',
|
41
|
-
maximumFractionDigits: 2,
|
42
|
-
}).format(dollars)
|
43
|
-
}
|
44
|
-
|
45
|
-
const formatBasicPostal = (value: string): string => {
|
46
|
-
return value.replace(/\D/g, '').slice(0, 5)
|
47
|
-
}
|
48
|
-
|
49
|
-
const formatExtendedPostal = (value: string): string => {
|
50
|
-
const cleaned = value.replace(/\D/g, '').slice(0, 9)
|
51
|
-
return cleaned.replace(/(\d{5})(?=\d)/, '$1-')
|
52
|
-
}
|
53
|
-
|
54
|
-
const formatSSN = (value: string): string => {
|
55
|
-
const cleaned = value.replace(/\D/g, '').slice(0, 9)
|
56
|
-
return cleaned
|
57
|
-
.replace(/(\d{5})(?=\d)/, '$1-')
|
58
|
-
.replace(/(\d{3})(?=\d)/, '$1-')
|
59
|
-
}
|
60
|
-
|
61
|
-
const formatCreditCard = (value: string): string => {
|
62
|
-
const cleaned = value.replace(/\D/g, '').slice(0, 16)
|
63
|
-
return cleaned.replace(/(\d{4})(?=\d)/g, '$1 ')
|
64
|
-
}
|
65
|
-
|
66
|
-
const formatCVV = (value: string): string => {
|
67
|
-
return value.replace(/\D/g, '').slice(0, 4)
|
68
|
-
}
|
69
|
-
|
70
|
-
export const INPUTMASKS: InputMaskDictionary = {
|
71
|
-
currency: {
|
72
|
-
format: formatCurrency,
|
73
|
-
formatDefaultValue: formatCurrencyDefaultValue,
|
74
|
-
// eslint-disable-next-line no-useless-escape
|
75
|
-
pattern: '^\\$\\d{1,3}(?:,\\d{3})*(?:\\.\\d{2})?$',
|
76
|
-
placeholder: '$0.00',
|
77
|
-
},
|
78
|
-
zipCode: {
|
79
|
-
format: formatBasicPostal,
|
80
|
-
formatDefaultValue: formatBasicPostal,
|
81
|
-
pattern: '\\d{5}',
|
82
|
-
placeholder: '12345',
|
83
|
-
},
|
84
|
-
postalCode: {
|
85
|
-
format: formatExtendedPostal,
|
86
|
-
formatDefaultValue: formatExtendedPostal,
|
87
|
-
pattern: '\\d{5}-\\d{4}',
|
88
|
-
placeholder: '12345-6789',
|
89
|
-
},
|
90
|
-
ssn: {
|
91
|
-
format: formatSSN,
|
92
|
-
formatDefaultValue: formatSSN,
|
93
|
-
pattern: '\\d{3}-\\d{2}-\\d{4}',
|
94
|
-
placeholder: '123-45-6789',
|
95
|
-
},
|
96
|
-
creditCard: {
|
97
|
-
format: formatCreditCard,
|
98
|
-
formatDefaultValue: formatCreditCard,
|
99
|
-
pattern: '\\d{4} \\d{4} \\d{4} \\d{4}',
|
100
|
-
placeholder: '1234 5678 9012 3456',
|
101
|
-
},
|
102
|
-
cvv: {
|
103
|
-
format: formatCVV,
|
104
|
-
formatDefaultValue: formatCVV,
|
105
|
-
pattern: '\\d{3,4}',
|
106
|
-
placeholder: '123',
|
107
|
-
},
|
108
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
@import "spacing";
|
2
|
-
|
3
|
-
.gap_none {
|
4
|
-
gap: 0;
|
5
|
-
}
|
6
|
-
|
7
|
-
.gap_xxs {
|
8
|
-
gap: $space_xxs;
|
9
|
-
}
|
10
|
-
|
11
|
-
.gap_xs {
|
12
|
-
gap: $space_xs;
|
13
|
-
}
|
14
|
-
|
15
|
-
.gap_sm {
|
16
|
-
gap: $space_sm;
|
17
|
-
}
|
18
|
-
|
19
|
-
.gap_md {
|
20
|
-
gap: $space_md;
|
21
|
-
}
|
22
|
-
|
23
|
-
.gap_lg {
|
24
|
-
gap: $space_lg;
|
25
|
-
}
|
26
|
-
|
27
|
-
.gap_xl {
|
28
|
-
gap: $space_xl;
|
29
|
-
}
|