playbook_ui 14.19.0.pre.alpha.PLAY21297675 → 14.19.0.pre.alpha.play2125phonenumberinputcountrysearcherrorstylefix7698
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +1 -11
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableActionBar.tsx +15 -148
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +3 -20
- data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableState.ts +13 -23
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +0 -9
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +2 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -5
- data/app/pb_kits/playbook/pb_advanced_table/scss_partials/advanced_table_sticky_mixin.scss +0 -1
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownContainer.tsx +2 -2
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +9 -9
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +2 -2
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +4 -2
- data/dist/chunks/{_typeahead-BPSIWtFT.js → _typeahead-BQV04mOl.js} +3 -3
- data/dist/chunks/_weekday_stacked-CVwWr8B2.js +45 -0
- data/dist/chunks/{lib-B20MXZcW.js → lib-DwFasxbk.js} +2 -2
- data/dist/chunks/{pb_form_validation-WWvUXPKD.js → pb_form_validation-nnXW3T-3.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- 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/version.rb +1 -1
- metadata +6 -15
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/VisibilityTree.ts +0 -47
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.jsx +0 -57
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.md +0 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_custom.jsx +0 -62
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_custom.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_multi.jsx +0 -82
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_multi.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_with_state.jsx +0 -65
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_with_state.md +0 -1
- data/dist/chunks/_weekday_stacked-BeuPAmxG.js +0 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1087cef4c8be18ff187168d62201d957f55e663176cf11a4ba16496a79d20044
|
4
|
+
data.tar.gz: e57d9d4c52674fefff6c0377e9edec29727731f1f4d48dc9427ec8dd3a7b5dc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a8f404939c101bdc6b972905f2a6717000d838d71266ab3047b9b02555abbd15de4bdd0202c3b1d08662110616d93ea603f66f55207efa5d37a7e1de651ae1b
|
7
|
+
data.tar.gz: e48a40d41c3b0fd0dba7ff67c29b163e87890a92831b9a1ad23aba0fd264ea17a0a70d4a699dcc2891e6d8cbcd78386237cee66e1e1f463c41a024f632f59276
|
@@ -93,17 +93,7 @@ export const RegularTableView = ({
|
|
93
93
|
|
94
94
|
{row.getVisibleCells().map((cell: Cell<GenericObject, unknown>, i: number) => {
|
95
95
|
const isPinnedLeft = columnPinning.left.includes(cell.column.id);
|
96
|
-
const isLastCell = (
|
97
|
-
const parent = cell.column.parent;
|
98
|
-
if (!parent) {
|
99
|
-
const last = row.getVisibleCells().at(-1);
|
100
|
-
return last?.column.id === cell.column.id;
|
101
|
-
}
|
102
|
-
|
103
|
-
const visibleSiblings = parent.columns.filter(col => col.getIsVisible());
|
104
|
-
return visibleSiblings.at(-1)?.id === cell.column.id;
|
105
|
-
})();
|
106
|
-
|
96
|
+
const isLastCell = cell.column.parent?.columns?.at(-1)?.id === cell.column.id;
|
107
97
|
const { column } = cell;
|
108
98
|
return (
|
109
99
|
<td
|
@@ -1,112 +1,25 @@
|
|
1
|
-
import React, { useEffect, useRef
|
2
|
-
|
3
|
-
import AdvancedTableContext from "../Context/AdvancedTableContext";
|
4
|
-
import { buildVisibilityTree } from "../Utilities/VisibilityTree";
|
5
|
-
|
1
|
+
import React, { useEffect, useRef } from "react";
|
6
2
|
import Card from "../../pb_card/_card";
|
7
3
|
import Caption from "../../pb_caption/_caption";
|
8
4
|
import Flex from "../../pb_flex/_flex";
|
9
5
|
import FlexItem from "../../pb_flex/_flex_item";
|
10
|
-
import
|
11
|
-
import DropdownContainer from "../../pb_dropdown/subcomponents/DropdownContainer";
|
12
|
-
import DropdownTrigger from "../../pb_dropdown/subcomponents/DropdownTrigger";
|
13
|
-
import Icon from "../../pb_icon/_icon";
|
14
|
-
import Checkbox from "../../pb_checkbox/_checkbox";
|
15
|
-
import SectionSeparator from "../../pb_section_separator/_section_separator";
|
16
|
-
import Tooltip from "../../pb_tooltip/_tooltip";
|
17
|
-
|
18
|
-
import {
|
19
|
-
showActionBar,
|
20
|
-
hideActionBar,
|
21
|
-
} from "../Utilities/ActionBarAnimationHelper";
|
22
|
-
import { GenericObject } from "../../types";
|
6
|
+
import { showActionBar, hideActionBar } from "../Utilities/ActionBarAnimationHelper";
|
23
7
|
|
24
8
|
interface TableActionBarProps {
|
25
|
-
isVisible: boolean
|
9
|
+
isVisible: boolean;
|
26
10
|
selectedCount: number;
|
27
11
|
actions?: React.ReactNode[] | React.ReactNode;
|
28
|
-
type?: string;
|
29
|
-
}
|
30
|
-
|
31
|
-
interface VisibilityNode {
|
32
|
-
id?: string | undefined;
|
33
|
-
label?: string | undefined;
|
34
|
-
children?: VisibilityNode[];
|
35
12
|
}
|
36
13
|
|
37
14
|
const TableActionBar: React.FC<TableActionBarProps> = ({
|
38
15
|
isVisible,
|
39
16
|
selectedCount,
|
40
|
-
actions
|
41
|
-
type = "row-selection",
|
17
|
+
actions
|
42
18
|
}) => {
|
43
19
|
const cardRef = useRef(null);
|
44
|
-
const { table, columnVisibilityControl, columnDefinitions } =
|
45
|
-
useContext(AdvancedTableContext);
|
46
|
-
|
47
|
-
// ----------- Column visibility logic -----------
|
48
|
-
const includeIds = columnVisibilityControl?.includeIds;
|
49
|
-
const firstLeafId = table.getAllLeafColumns()[0]?.id;
|
50
|
-
// Get the first leaf column ID to exclude it from the visibility tree
|
51
|
-
// This is to avoid showing the first column in the dropdown
|
52
|
-
// as toggling it's visibility breaks the expanded row functionality
|
53
|
-
const tree = buildVisibilityTree(columnDefinitions, includeIds).filter(node => node.id !== firstLeafId);
|
54
|
-
|
55
|
-
const renderLeaf = (id: string, label: string) => {
|
56
|
-
const col = table.getColumn(id);
|
57
|
-
const show = col.getIsVisible();
|
58
|
-
|
59
|
-
return (
|
60
|
-
<Checkbox
|
61
|
-
checked={show}
|
62
|
-
key={id}
|
63
|
-
onChange={() => col.toggleVisibility()}
|
64
|
-
paddingBottom="xs"
|
65
|
-
text={label}
|
66
|
-
/>
|
67
|
-
);
|
68
|
-
};
|
69
|
-
|
70
|
-
const gatherLeafIds = (node: VisibilityNode): string[] =>
|
71
|
-
node.children && node.children.length
|
72
|
-
? node.children.flatMap(gatherLeafIds)
|
73
|
-
: node.id
|
74
|
-
? [node.id]
|
75
|
-
: [];
|
76
|
-
|
77
|
-
const renderGroup = (node: VisibilityNode ) => {
|
78
|
-
const leaves = gatherLeafIds(node);
|
79
|
-
const visibleArray = leaves.map((id) => table.getColumn(id).getIsVisible());
|
80
|
-
const allOn = visibleArray.every(Boolean);
|
81
|
-
const someOn = visibleArray.some(Boolean);
|
82
|
-
|
83
|
-
return (
|
84
|
-
<>
|
85
|
-
<Checkbox
|
86
|
-
checked={allOn}
|
87
|
-
indeterminate={!allOn && someOn}
|
88
|
-
onChange={() =>
|
89
|
-
leaves.forEach((id) =>
|
90
|
-
table.getColumn(id).toggleVisibility(!allOn),
|
91
|
-
)
|
92
|
-
}
|
93
|
-
paddingBottom="xs"
|
94
|
-
text={node.label}
|
95
|
-
/>
|
96
|
-
<Flex flexDirection="column"
|
97
|
-
paddingLeft="lg"
|
98
|
-
>
|
99
|
-
{node?.children?.map((child) =>
|
100
|
-
child.children ? renderGroup(child) : renderLeaf(child.id, child.label),
|
101
|
-
)}
|
102
|
-
</Flex>
|
103
|
-
</>
|
104
|
-
);
|
105
|
-
};
|
106
|
-
// ------------ End of column visibility logic --------
|
107
20
|
|
108
21
|
useEffect(() => {
|
109
|
-
if (cardRef.current
|
22
|
+
if (cardRef.current) {
|
110
23
|
if (isVisible) {
|
111
24
|
showActionBar(cardRef.current);
|
112
25
|
} else {
|
@@ -118,68 +31,22 @@ const TableActionBar: React.FC<TableActionBarProps> = ({
|
|
118
31
|
return (
|
119
32
|
<Card
|
120
33
|
borderNone={!isVisible}
|
121
|
-
className={`${
|
122
|
-
isVisible && "show-action-card row-selection-actions-card"
|
123
|
-
}`}
|
34
|
+
className={`${isVisible && "show-action-card row-selection-actions-card"}`}
|
124
35
|
htmlOptions={{ ref: cardRef as any }}
|
125
36
|
padding={`${isVisible ? "xs" : "none"}`}
|
126
37
|
>
|
127
38
|
<Flex
|
128
39
|
alignItems="center"
|
129
|
-
justify=
|
40
|
+
justify="between"
|
130
41
|
>
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
<FlexItem>{actions}</FlexItem>
|
140
|
-
</>
|
141
|
-
) : (
|
142
|
-
<Dropdown
|
143
|
-
className="column-visibility-dropdown-wrapper"
|
144
|
-
options={columnDefinitions}
|
145
|
-
>
|
146
|
-
<DropdownTrigger>
|
147
|
-
<Tooltip
|
148
|
-
placement='top'
|
149
|
-
text="Column Configuration"
|
150
|
-
zIndex={10}
|
151
|
-
>
|
152
|
-
<Icon
|
153
|
-
color="primary"
|
154
|
-
cursor="pointer"
|
155
|
-
icon="sliders-h"
|
156
|
-
/>
|
157
|
-
</Tooltip>
|
158
|
-
</DropdownTrigger>
|
159
|
-
<DropdownContainer
|
160
|
-
className="column-visibility-dropdown"
|
161
|
-
paddingTop="sm"
|
162
|
-
>
|
163
|
-
<>
|
164
|
-
<Caption
|
165
|
-
paddingBottom="sm"
|
166
|
-
text="Columns Config"
|
167
|
-
textAlign="center"
|
168
|
-
/>
|
169
|
-
<SectionSeparator paddingBottom="xs" />
|
170
|
-
{tree.map((node: VisibilityNode) => (
|
171
|
-
<Flex cursor="pointer"
|
172
|
-
flexDirection="column"
|
173
|
-
key={node.id}
|
174
|
-
paddingX="xs"
|
175
|
-
>
|
176
|
-
{node.children ? renderGroup(node) : renderLeaf(node.id, node.label)}
|
177
|
-
</Flex>
|
178
|
-
))}
|
179
|
-
</>
|
180
|
-
</DropdownContainer>
|
181
|
-
</Dropdown>
|
182
|
-
)}
|
42
|
+
<Caption
|
43
|
+
color="light"
|
44
|
+
paddingLeft="xs"
|
45
|
+
size="xs"
|
46
|
+
>
|
47
|
+
{selectedCount} Selected
|
48
|
+
</Caption>
|
49
|
+
<FlexItem>{actions}</FlexItem>
|
183
50
|
</Flex>
|
184
51
|
</Card>
|
185
52
|
);
|
@@ -79,26 +79,9 @@ export const TableHeaderCell = ({
|
|
79
79
|
header?.column.getLeafColumns().length === 1 &&
|
80
80
|
header?.column.getLeafColumns()[0].id === header.column.id
|
81
81
|
|
82
|
-
const
|
83
|
-
|
84
|
-
(
|
85
|
-
col.columns.some((child: any) => columnHasVisibleLeaf(child)));
|
86
|
-
|
87
|
-
// Check on column position in stack + visibility to add the vertical border
|
88
|
-
const isLastHeaderCell = (() => {
|
89
|
-
if (!header) return false;
|
90
|
-
|
91
|
-
if (header.colSpan > 1 && header.column.parent !== undefined) return true;
|
92
|
-
|
93
|
-
const parent = header.column.parent;
|
94
|
-
|
95
|
-
if (!parent) {
|
96
|
-
const topHeaders = table?.getHeaderGroups()[0].headers.filter((h: any) => columnHasVisibleLeaf(h.column));
|
97
|
-
return topHeaders?.at(-1)?.id === header.id;
|
98
|
-
}
|
99
|
-
const visibleSiblings = parent.columns.filter(columnHasVisibleLeaf);
|
100
|
-
return visibleSiblings.at(-1) === header.column;
|
101
|
-
})();
|
82
|
+
const isLastHeaderCell =
|
83
|
+
header?.column.parent?.columns.at(-1) === header?.column ||
|
84
|
+
(header?.colSpan > 1 && header?.column.parent !== undefined);
|
102
85
|
|
103
86
|
const cellClassName = classnames(
|
104
87
|
"table-header-cells",
|
@@ -26,8 +26,6 @@ interface UseTableStateProps {
|
|
26
26
|
virtualizedRows?: boolean;
|
27
27
|
tableOptions?: GenericObject;
|
28
28
|
onRowSelectionChange?: (arg: RowSelectionState) => void;
|
29
|
-
columnVisibilityControl?: GenericObject;
|
30
|
-
|
31
29
|
}
|
32
30
|
|
33
31
|
export function useTableState({
|
@@ -42,19 +40,16 @@ export function useTableState({
|
|
42
40
|
pagination = false,
|
43
41
|
paginationProps,
|
44
42
|
virtualizedRows = false,
|
45
|
-
tableOptions
|
46
|
-
columnVisibilityControl
|
43
|
+
tableOptions
|
47
44
|
}: UseTableStateProps) {
|
48
45
|
// Create a local state for expanded and setExpanded if expandedControl not used
|
49
46
|
const [localExpanded, setLocalExpanded] = useState({});
|
50
47
|
const [loadingStateRowCount, setLoadingStateRowCount] = useState(initialLoadingRowsCount);
|
51
48
|
const [rowSelection, setRowSelection] = useState<RowSelectionState>({});
|
52
|
-
|
49
|
+
|
53
50
|
// Determine whether to use the prop or the local state
|
54
51
|
const expanded = expandedControl ? expandedControl.value : localExpanded;
|
55
52
|
const setExpanded = expandedControl ? expandedControl.onChange : setLocalExpanded;
|
56
|
-
const columnVisibility = (columnVisibilityControl && columnVisibilityControl.value) ? columnVisibilityControl.value : localColumnVisibility;
|
57
|
-
const setColumnVisibility = (columnVisibilityControl && columnVisibilityControl.onChange) ? columnVisibilityControl.onChange : setLocalColumnVisibility;
|
58
53
|
|
59
54
|
// Virtualized data handling (chunked loading)
|
60
55
|
const fetchSize = 20; // Number of rows per "page"
|
@@ -109,21 +104,17 @@ export function useTableState({
|
|
109
104
|
}]), [columnDefinitions, sortControl]);
|
110
105
|
|
111
106
|
// Custom state based on features enabled
|
112
|
-
const customState = useCallback(() =>
|
113
|
-
|
114
|
-
expanded,
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
selectableRows,
|
124
|
-
rowSelection,
|
125
|
-
columnVisibility,
|
126
|
-
]);
|
107
|
+
const customState = useCallback(() => {
|
108
|
+
if (sortControl && selectableRows) {
|
109
|
+
return { state: { expanded, sorting, rowSelection } };
|
110
|
+
} else if (sortControl) {
|
111
|
+
return { state: { expanded, sorting } };
|
112
|
+
} else if (selectableRows) {
|
113
|
+
return { state: { expanded, rowSelection } };
|
114
|
+
} else {
|
115
|
+
return { state: { expanded } };
|
116
|
+
}
|
117
|
+
}, [expanded, rowSelection, sortControl, selectableRows, sorting]);
|
127
118
|
|
128
119
|
// Pagination configuration
|
129
120
|
const paginationInitializer = useMemo(() => {
|
@@ -154,7 +145,6 @@ export function useTableState({
|
|
154
145
|
sortDescFirst: true,
|
155
146
|
onRowSelectionChange: setRowSelection,
|
156
147
|
getRowId: selectableRows ? row => row.id : undefined,
|
157
|
-
onColumnVisibilityChange: setColumnVisibility,
|
158
148
|
meta: {
|
159
149
|
columnDefinitions
|
160
150
|
},
|
@@ -53,15 +53,6 @@
|
|
53
53
|
width: 100%;
|
54
54
|
}
|
55
55
|
|
56
|
-
.column-visibility-dropdown-wrapper {
|
57
|
-
position: unset !important;
|
58
|
-
}
|
59
|
-
.column-visibility-dropdown {
|
60
|
-
width: unset !important;
|
61
|
-
right: $space_xxs;
|
62
|
-
text-align: left;
|
63
|
-
}
|
64
|
-
|
65
56
|
// Virtualized table styles
|
66
57
|
.virtualized-table-row {
|
67
58
|
display: table !important;
|
@@ -35,7 +35,6 @@ type AdvancedTableProps = {
|
|
35
35
|
className?: string
|
36
36
|
columnDefinitions: GenericObject[]
|
37
37
|
columnGroupBorderColor?: "text_lt_default" | "text_lt_light" | "text_lt_lighter" | "text_dk_default" | "text_dk_light" | "text_dk_lighter"
|
38
|
-
columnVisibilityControl?: GenericObject
|
39
38
|
dark?: boolean
|
40
39
|
data?: { [key: string]: string }
|
41
40
|
enableToggleExpansion?: "all" | "header" | "none"
|
@@ -74,7 +73,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
74
73
|
className,
|
75
74
|
columnDefinitions,
|
76
75
|
columnGroupBorderColor,
|
77
|
-
columnVisibilityControl,
|
78
76
|
dark = false,
|
79
77
|
data = {},
|
80
78
|
enableToggleExpansion = "header",
|
@@ -134,8 +132,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
134
132
|
paginationProps,
|
135
133
|
virtualizedRows,
|
136
134
|
tableOptions,
|
137
|
-
onRowSelectionChange
|
138
|
-
columnVisibilityControl,
|
135
|
+
onRowSelectionChange
|
139
136
|
});
|
140
137
|
|
141
138
|
// Initialize table actions
|
@@ -255,7 +252,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
255
252
|
: {};
|
256
253
|
|
257
254
|
// Visibility flag for action bar
|
258
|
-
const isActionBarVisible =
|
255
|
+
const isActionBarVisible = selectableRows && showActionsBar && selectedRowsLength > 0;
|
259
256
|
|
260
257
|
return (
|
261
258
|
<>
|
@@ -289,7 +286,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
289
286
|
<AdvancedTableProvider
|
290
287
|
columnDefinitions={columnDefinitions}
|
291
288
|
columnGroupBorderColor={columnGroupBorderColor}
|
292
|
-
columnVisibilityControl={columnVisibilityControl}
|
293
289
|
enableToggleExpansion={enableToggleExpansion}
|
294
290
|
enableVirtualization={virtualizedRows}
|
295
291
|
expandByDepth={expandByDepth}
|
@@ -320,7 +316,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
320
316
|
actions={actions}
|
321
317
|
isVisible={isActionBarVisible}
|
322
318
|
selectedCount={selectedRowsLength}
|
323
|
-
type={columnVisibilityControl ? "column-visibility" : "row-selection"}
|
324
319
|
/>
|
325
320
|
|
326
321
|
{/* Main Table */}
|
@@ -47,7 +47,3 @@ examples:
|
|
47
47
|
- advanced_table_selectable_rows_header: Selectable Rows (No Actions Bar)
|
48
48
|
- advanced_table_inline_editing: Inline Cell Editing
|
49
49
|
- advanced_table_fullscreen: Fullscreen
|
50
|
-
- advanced_table_column_visibility: Column Visibility Control
|
51
|
-
- advanced_table_column_visibility_with_state: Column Visibility Control With State
|
52
|
-
- advanced_table_column_visibility_custom: Column Visibility Control with Custom Dropdown
|
53
|
-
- advanced_table_column_visibility_multi: Column Visibility Control with Multi-Header Columns
|
@@ -27,8 +27,4 @@ export { default as AdvancedTableStickyColumns } from './_advanced_table_sticky_
|
|
27
27
|
export { default as AdvancedTableStickyHeader } from './_advanced_table_sticky_header.jsx'
|
28
28
|
export { default as AdvancedTableStickyColumnsAndHeader } from './_advanced_table_sticky_columns_and_header.jsx'
|
29
29
|
export { default as AdvancedTableExpandByDepth } from './_advanced_table_expand_by_depth.jsx'
|
30
|
-
export { default as AdvancedTableColumnBorderColor} from './_advanced_table_column_border_color.jsx'
|
31
|
-
export { default as AdvancedTableColumnVisibility } from './_advanced_table_column_visibility.jsx'
|
32
|
-
export { default as AdvancedTableColumnVisibilityCustom } from './_advanced_table_column_visibility_custom.jsx'
|
33
|
-
export { default as AdvancedTableColumnVisibilityMulti } from './_advanced_table_column_visibility_multi.jsx'
|
34
|
-
export { default as AdvancedTableColumnVisibilityWithState } from './_advanced_table_column_visibility_with_state.jsx'
|
30
|
+
export { default as AdvancedTableColumnBorderColor} from './_advanced_table_column_border_color.jsx'
|
@@ -6,7 +6,7 @@ import {
|
|
6
6
|
buildDataProps,
|
7
7
|
buildHtmlProps
|
8
8
|
} from "../../utilities/props";
|
9
|
-
import { globalProps
|
9
|
+
import { globalProps } from "../../utilities/globalProps";
|
10
10
|
|
11
11
|
import DropdownContext from "../context";
|
12
12
|
|
@@ -24,7 +24,7 @@ type DropdownContainerProps = {
|
|
24
24
|
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
25
25
|
id?: string;
|
26
26
|
searchbar?: boolean;
|
27
|
-
}
|
27
|
+
};
|
28
28
|
|
29
29
|
const DropdownContainer = (props: DropdownContainerProps) => {
|
30
30
|
const {
|
@@ -42,7 +42,7 @@ $flag-min-resolution: 192dpi;
|
|
42
42
|
.iti__country-list {
|
43
43
|
min-width: $dropdown-min-width;
|
44
44
|
}
|
45
|
-
// iti-spacer-horizontal's default is 8px, or $space_xs
|
45
|
+
// iti-spacer-horizontal's default is 8px, or $space_xs
|
46
46
|
.iti__country-list .iti__flag, .iti__country-name {
|
47
47
|
margin-right: $space_xs;
|
48
48
|
}
|
@@ -60,7 +60,7 @@ $flag-min-resolution: 192dpi;
|
|
60
60
|
color: $focus_input_light;
|
61
61
|
}
|
62
62
|
|
63
|
-
.dropdown_open {
|
63
|
+
.dropdown_open:not(.error) {
|
64
64
|
.text_input {
|
65
65
|
border-color: $primary !important;
|
66
66
|
}
|
@@ -76,7 +76,7 @@ $flag-min-resolution: 192dpi;
|
|
76
76
|
}
|
77
77
|
|
78
78
|
.iti__divider {
|
79
|
-
border-bottom: 1px solid $border_light !important;
|
79
|
+
border-bottom: 1px solid $border_light !important;
|
80
80
|
}
|
81
81
|
|
82
82
|
.iti__selected-country-primary {
|
@@ -96,7 +96,7 @@ $flag-min-resolution: 192dpi;
|
|
96
96
|
justify-content: center;
|
97
97
|
align-items: center;
|
98
98
|
border-width: 0;
|
99
|
-
border-radius: $space_xxs;
|
99
|
+
border-radius: $space_xxs;
|
100
100
|
|
101
101
|
&[aria-expanded="true"] {
|
102
102
|
color: $primary_action;
|
@@ -199,7 +199,7 @@ $flag-min-resolution: 192dpi;
|
|
199
199
|
}
|
200
200
|
|
201
201
|
.iti__dropdown-content {
|
202
|
-
border-radius: $space_xs;
|
202
|
+
border-radius: $space_xs;
|
203
203
|
border: 1px solid $border_light !important;
|
204
204
|
position: absolute;
|
205
205
|
top: 100%;
|
@@ -228,13 +228,13 @@ $flag-min-resolution: 192dpi;
|
|
228
228
|
}
|
229
229
|
|
230
230
|
.iti__dropdown-content {
|
231
|
-
border-radius: $space_xs;
|
231
|
+
border-radius: $space_xs;
|
232
232
|
border: 1px solid $border_dark !important;
|
233
233
|
.iti__search-input {
|
234
234
|
background-color: $bg_dark_card;
|
235
235
|
&:hover {
|
236
236
|
background-color: $bg_dark_card;
|
237
|
-
}
|
237
|
+
}
|
238
238
|
&:active,
|
239
239
|
&:focus {
|
240
240
|
background-color: $card_dark;
|
@@ -243,7 +243,7 @@ $flag-min-resolution: 192dpi;
|
|
243
243
|
}
|
244
244
|
|
245
245
|
.iti__divider {
|
246
|
-
border-bottom: 1px solid $border_dark !important;
|
246
|
+
border-bottom: 1px solid $border_dark !important;
|
247
247
|
}
|
248
248
|
|
249
249
|
.iti__country-list {
|
@@ -278,7 +278,7 @@ $flag-min-resolution: 192dpi;
|
|
278
278
|
color: $white;
|
279
279
|
}
|
280
280
|
}
|
281
|
-
|
281
|
+
|
282
282
|
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: $flag-min-resolution) {
|
283
283
|
.iti__flag {
|
284
284
|
background-image: url("https://unpkg.com/intl-tel-input@24.6.0/build/img/flags@2x.png");
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
2
2
|
import classnames from 'classnames'
|
3
3
|
|
4
4
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
5
|
-
import { globalProps, globalInlineProps
|
5
|
+
import { globalProps, globalInlineProps } from '../utilities/globalProps'
|
6
6
|
|
7
7
|
import Caption from '../pb_caption/_caption'
|
8
8
|
|
@@ -19,7 +19,7 @@ type SectionSeparatorProps = {
|
|
19
19
|
orientation?: "horizontal" | "vertical",
|
20
20
|
text?: string,
|
21
21
|
variant?: "card" | "background",
|
22
|
-
}
|
22
|
+
}
|
23
23
|
|
24
24
|
const SectionSeparator = (props: SectionSeparatorProps): React.ReactElement => {
|
25
25
|
const {
|
@@ -71,7 +71,8 @@
|
|
71
71
|
}
|
72
72
|
&.error {
|
73
73
|
.text_input_wrapper {
|
74
|
-
input
|
74
|
+
// The `:not` here prevents error styling from affecting the country search input in the Phone Number Input Kit.
|
75
|
+
input:not(.iti__search-input),
|
75
76
|
.text_input {
|
76
77
|
border-color: $error_dark;
|
77
78
|
}
|
@@ -102,7 +103,8 @@
|
|
102
103
|
[class*="pb_body_kit"] {
|
103
104
|
margin-top: $space_xs / 2;
|
104
105
|
}
|
105
|
-
input
|
106
|
+
// The `:not` here prevents error styling from affecting the country search input in the Phone Number Input Kit.
|
107
|
+
input:not(.iti__search-input),
|
106
108
|
.text_input {
|
107
109
|
border-color: $error;
|
108
110
|
}
|