playbook_ui 14.17.0.pre.rc.1 → 14.18.0.pre.rc.0

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 (95) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Utilities/types.ts +1 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +70 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +83 -2
  5. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +20 -7
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +90 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.md +3 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -1
  10. data/app/pb_kits/playbook/pb_background/_background.scss +26 -0
  11. data/app/pb_kits/playbook/pb_background/_background.tsx +5 -3
  12. data/app/pb_kits/playbook/pb_background/background.test.js +5 -0
  13. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.jsx +35 -0
  14. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.md +1 -0
  15. data/app/pb_kits/playbook/pb_background/docs/example.yml +1 -0
  16. data/app/pb_kits/playbook/pb_background/docs/index.js +1 -0
  17. data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +14 -7
  18. data/app/pb_kits/playbook/pb_contact/contact.test.js +7 -7
  19. data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.test.js +2 -2
  20. data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.test.js +1 -1
  21. data/app/pb_kits/playbook/pb_draggable/_draggable.scss +43 -20
  22. data/app/pb_kits/playbook/pb_draggable/context/index.tsx +58 -17
  23. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx +102 -105
  24. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md +3 -3
  25. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx +50 -48
  26. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md +1 -1
  27. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.jsx +110 -0
  28. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.md +5 -0
  29. data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table_react.jsx → _draggable_with_table.jsx} +1 -1
  30. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +3 -1
  31. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +9 -6
  32. data/app/pb_kits/playbook/pb_draggable/docs/index.js +4 -1
  33. data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +71 -3
  34. data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx +4 -3
  35. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +6 -6
  36. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx +6 -6
  37. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +6 -6
  38. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +8 -8
  39. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +3 -3
  40. data/app/pb_kits/playbook/pb_form_group/_form_group.scss +22 -0
  41. data/app/pb_kits/playbook/pb_icon/icon.test.js +9 -9
  42. data/app/pb_kits/playbook/pb_icon_circle/icon_circle.test.js +1 -1
  43. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.test.js +1 -1
  44. data/app/pb_kits/playbook/pb_icon_value/icon_value.test.js +1 -1
  45. data/app/pb_kits/playbook/pb_label_value/label_value.test.js +1 -1
  46. data/app/pb_kits/playbook/pb_layout/_layout.scss +58 -0
  47. data/app/pb_kits/playbook/pb_layout/_layout.tsx +20 -7
  48. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +190 -0
  49. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +5 -0
  50. data/app/pb_kits/playbook/pb_layout/docs/example.yml +1 -0
  51. data/app/pb_kits/playbook/pb_layout/docs/index.js +1 -0
  52. data/app/pb_kits/playbook/pb_layout/layout.test.js +4 -0
  53. data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +90 -0
  54. data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +57 -0
  55. data/app/pb_kits/playbook/pb_link/link.test.jsx +2 -2
  56. data/app/pb_kits/playbook/pb_nav/_nav_item.test.js +5 -3
  57. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_vertical.md +1 -0
  58. data/app/pb_kits/playbook/pb_stat_change/stat_change.test.js +8 -4
  59. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.html.erb +34 -0
  60. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_rails.md +1 -0
  61. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.html.erb +36 -0
  62. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_rails.md +1 -0
  63. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -1
  64. data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
  65. data/app/pb_kits/playbook/pb_table/styles/_headers.scss +19 -7
  66. data/app/pb_kits/playbook/pb_table/styles/_striped.scss +3 -3
  67. data/app/pb_kits/playbook/pb_table/table.rb +13 -1
  68. data/app/pb_kits/playbook/pb_table/table_header.rb +13 -1
  69. data/app/pb_kits/playbook/pb_tooltip/tooltip.html.erb +2 -5
  70. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +4 -4
  71. data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +2 -5
  72. data/app/pb_kits/playbook/pb_user/user.html.erb +1 -6
  73. data/app/pb_kits/playbook/pb_user_badge/user_badge.html.erb +1 -6
  74. data/dist/chunks/{_typeahead-Djo6qCne.js → _typeahead-C2GOKWtm.js} +2 -2
  75. data/dist/chunks/_weekday_stacked-CFGTPT0O.js +45 -0
  76. data/dist/chunks/vendor.js +1 -1
  77. data/dist/playbook-doc.js +1 -1
  78. data/dist/playbook-rails-react-bindings.js +1 -1
  79. data/dist/playbook-rails.js +1 -1
  80. data/dist/playbook.css +1 -1
  81. data/lib/playbook/kit_base.rb +4 -4
  82. data/lib/playbook/version.rb +2 -2
  83. metadata +31 -16
  84. data/dist/chunks/_weekday_stacked-DIIHW0OV.js +0 -45
  85. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default_rails.html.erb → _draggable_default.html.erb} +0 -0
  86. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default.md → _draggable_default_react.md} +0 -0
  87. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers_rails.html.erb → _draggable_multiple_containers.html.erb} +0 -0
  88. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers.md → _draggable_multiple_containers_react.md} +0 -0
  89. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards_rails.html.erb → _draggable_with_cards.html.erb} +0 -0
  90. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards.md → _draggable_with_cards_react.md} +0 -0
  91. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list_rails.html.erb → _draggable_with_list.html.erb} +0 -0
  92. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list.md → _draggable_with_list_react.md} +0 -0
  93. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list_rails.html.erb → _draggable_with_selectable_list.html.erb} +0 -0
  94. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list.md → _draggable_with_selectable_list_react.md} +0 -0
  95. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table.md → _draggable_with_table_rails.md} +0 -0
@@ -0,0 +1,110 @@
1
+ import React, { useState } from "react";
2
+ import Flex from '../../pb_flex/_flex'
3
+ import Caption from '../../pb_caption/_caption'
4
+ import Draggable from '../_draggable'
5
+ import { DraggableProvider } from '../context'
6
+ import Image from '../../pb_image/_image'
7
+
8
+
9
+
10
+ const dataLineVertical = [
11
+ {
12
+ id: "211",
13
+ url: "https://unsplash.it/500/400/?image=633",
14
+ },
15
+ {
16
+ id: "212",
17
+ url: "https://unsplash.it/500/400/?image=634",
18
+ },
19
+ {
20
+ id: "213",
21
+ url: "https://unsplash.it/500/400/?image=637",
22
+ },
23
+ ];
24
+
25
+ const dataLineHorizontal = [
26
+ {
27
+ id: "2111",
28
+ url: "https://unsplash.it/500/400/?image=633",
29
+ },
30
+ {
31
+ id: "2122",
32
+ url: "https://unsplash.it/500/400/?image=634",
33
+ },
34
+ {
35
+ id: "2133",
36
+ url: "https://unsplash.it/500/400/?image=637",
37
+ },
38
+ ];
39
+
40
+ const DraggableDropZones = (props) => {
41
+ const [initialLineVerticalState, setInitialLineVerticalState] = useState(dataLineVertical);
42
+ const [initialLineHorizontalState, setInitialLineHorizontalState] = useState(dataLineHorizontal);
43
+
44
+ return (
45
+ <>
46
+ <Caption marginBottom="xs"
47
+ marginTop="xl"
48
+ text="Vertical"
49
+ />
50
+ <DraggableProvider
51
+ dropZone={{ type: "line", color: "purple" }}
52
+ initialItems={dataLineVertical}
53
+ onReorder={(items) => setInitialLineVerticalState(items)}
54
+ >
55
+ <Draggable.Container {...props}>
56
+ <Flex flexDirection="column"
57
+ height="367px"
58
+ >
59
+ {initialLineVerticalState.map(({ id, url }) => (
60
+ <Draggable.Item dragId={id}
61
+ key={id}
62
+ marginBottom="sm"
63
+ >
64
+ <Image alt={id}
65
+ size="md"
66
+ url={url}
67
+ />
68
+ </Draggable.Item>
69
+ ))}
70
+ </Flex>
71
+ </Draggable.Container>
72
+ </DraggableProvider>
73
+ <Caption marginBottom="xs"
74
+ marginTop="xl"
75
+ text="Horizontal"
76
+ />
77
+ <Flex>
78
+ <DraggableProvider
79
+ dropZone={{ type: "line", direction: "horizontal" }}
80
+ initialItems={dataLineHorizontal}
81
+ onReorder={(items) => setInitialLineHorizontalState(items)}
82
+ >
83
+ <Draggable.Container
84
+ htmlOptions={{style:{ width: "285px"}}}
85
+ {...props}
86
+ >
87
+ <Flex alignItems="stretch"
88
+ flexDirection="row"
89
+ height="110px"
90
+ >
91
+ {initialLineHorizontalState.map(({ id, url }) => (
92
+ <Draggable.Item dragId={id}
93
+ key={id}
94
+ marginRight="sm"
95
+ >
96
+ <Image alt={id}
97
+ size="md"
98
+ url={url}
99
+ />
100
+ </Draggable.Item>
101
+ ))}
102
+ </Flex>
103
+ </Draggable.Container>
104
+ </DraggableProvider>
105
+ </Flex>
106
+ </>
107
+ );
108
+ };
109
+
110
+ export default DraggableDropZones;
@@ -0,0 +1,5 @@
1
+ When using the "line" style, make sure to set the appropriate `direction` attribute within the `dropZone` prop based on the orientation of your draggable view. By default, this is set to "vertical," but it can also be adjusted to "horizontal." Note that the direction attribute only applies to the "line" style and does not affect other drop zone styles. The default `color` for "line" is "primary" and "purple" is the only alternative color option.
2
+
3
+ The length of the line is calculated based off of the width (for "vertical") or height (for "horizontal") of the parent container holding the draggable items.
4
+
5
+ Additionally, if the parent container of the `DraggableProvider`/`DraggableContainer` (or a subcontainer within) does not have a set height (for "vertical") or width (for "horizontal"), like the [Draggable Drop Zones doc example](https://playbook.powerapp.cloud/kits/draggable/react#draggable-drop-zones) does, elements on the page may jump up (for "vertical") or to the left (for "horizontal") when an item is actively being dragged. To prevent this, give a parent element a fixed height (for "vertical") or width (for "horizontal") as demonstrated in this doc example.
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from "react";
2
2
 
3
3
  import Flex from '../../pb_flex/_flex'
4
- import { DraggableProvider } from '../../pb_draggable/context'
4
+ import { DraggableProvider } from '../context'
5
5
  import Avatar from '../../pb_avatar/_avatar'
6
6
  import Body from '../../pb_body/_body'
7
7
  import Table from '../../pb_table/_table'
@@ -2,4 +2,6 @@ The draggable kit can also be used in conjunction with the table kit to create d
2
2
 
3
3
  - Wrap the Table with the `DraggableProvider` and manage state as shown.
4
4
  - use the `draggableContainer` prop on the Table.Body to designate it as the Draggable Container
5
- - use the `draggableItem` prop on the Table.Row to designate it as the Draggable Item. Make sure to also pass id to the `dragId` prop here.
5
+ - use the `draggableItem` prop on the Table.Row to designate it as the Draggable Item. Make sure to also pass id to the `dragId` prop here.
6
+
7
+ We recommending using the default `dropZone type` with the Table kit.
@@ -4,14 +4,17 @@ examples:
4
4
  - draggable_with_list: Draggable with List Kit
5
5
  - draggable_with_selectable_list: Draggable with SelectableList Kit
6
6
  - draggable_with_cards: Draggable with Cards
7
- - draggable_with_table_react: Draggable with Table
7
+ - draggable_with_table: Draggable with Table
8
8
  - draggable_multiple_containers: Dragging Across Multiple Containers
9
+ - draggable_drop_zones: Draggable Drop Zones
10
+ - draggable_drop_zones_colors: Draggable Drop Zones Colors
11
+ - draggable_drop_zones_line: Draggable Drop Zones Line
9
12
 
10
13
  rails:
11
- - draggable_default_rails: Default
12
- - draggable_with_list_rails: Draggable with List Kit
13
- - draggable_with_selectable_list_rails: Draggable with SelectableList Kit
14
- - draggable_with_cards_rails: Draggable with Cards
14
+ - draggable_default: Default
15
+ - draggable_with_list: Draggable with List Kit
16
+ - draggable_with_selectable_list: Draggable with SelectableList Kit
17
+ - draggable_with_cards: Draggable with Cards
15
18
  - draggable_with_table: Draggable with Table
16
- - draggable_multiple_containers_rails: Dragging Across Multiple Containers
19
+ - draggable_multiple_containers: Dragging Across Multiple Containers
17
20
 
@@ -3,4 +3,7 @@ export { default as DraggableWithCards } from './_draggable_with_cards.jsx'
3
3
  export { default as DraggableWithList } from './_draggable_with_list.jsx'
4
4
  export { default as DraggableWithSelectableList } from './_draggable_with_selectable_list.jsx'
5
5
  export { default as DraggableMultipleContainers } from './_draggable_multiple_containers.jsx'
6
- export { default as DraggableWithTableReact } from './_draggable_with_table_react.jsx'
6
+ export { default as DraggableWithTable } from './_draggable_with_table.jsx'
7
+ export { default as DraggableDropZones } from './_draggable_drop_zones.jsx'
8
+ export { default as DraggableDropZonesColors } from './_draggable_drop_zones_colors.jsx'
9
+ export { default as DraggableDropZonesLine } from './_draggable_drop_zones_line.jsx'
@@ -128,6 +128,58 @@ const DraggableKitWithCard = () => {
128
128
  );
129
129
  };
130
130
 
131
+ const DraggableWithLineVertical = () => {
132
+ const [initialState, setInitialState] = useState(data);
133
+ return (
134
+ <div data-testid={testId}>
135
+ <DraggableProvider
136
+ dropZone={{ type: "line" }}
137
+ initialItems={data}
138
+ onReorder={(items) => setInitialState(items)}
139
+ >
140
+ <Draggable>
141
+ <Draggable.Container>
142
+ {initialState.map(({ id, text }) => (
143
+ <Draggable.Item
144
+ dragId={id}
145
+ key={id}
146
+ >
147
+ {text}
148
+ </Draggable.Item>
149
+ ))}
150
+ </Draggable.Container>
151
+ </Draggable>
152
+ </DraggableProvider>
153
+ </div>
154
+ );
155
+ };
156
+
157
+ const DraggableWithLineHorizontal = () => {
158
+ const [initialState, setInitialState] = useState(data);
159
+ return (
160
+ <div data-testid={testId}>
161
+ <DraggableProvider
162
+ dropZone={{ type: "line", direction: "horizontal" }}
163
+ initialItems={data}
164
+ onReorder={(items) => setInitialState(items)}
165
+ >
166
+ <Draggable>
167
+ <Draggable.Container>
168
+ {initialState.map(({ id, text }) => (
169
+ <Draggable.Item
170
+ dragId={id}
171
+ key={id}
172
+ >
173
+ {text}
174
+ </Draggable.Item>
175
+ ))}
176
+ </Draggable.Container>
177
+ </Draggable>
178
+ </DraggableProvider>
179
+ </div>
180
+ );
181
+ };
182
+
131
183
  test("generated default kit and classname", () => {
132
184
  render(<DefaultDraggableKit />);
133
185
  const kit = screen.getByTestId(testId);
@@ -165,7 +217,7 @@ test("generated dragHandle with List", () => {
165
217
 
166
218
  const list = kit.querySelector(".pb_list_kit");
167
219
  expect(list).toBeInTheDocument();
168
- const dragHandle = list.querySelector(".fa-grip-dots-vertical");
220
+ const dragHandle = list.querySelector(".pb_custom_icon");
169
221
  expect(dragHandle).toBeInTheDocument();
170
222
  });
171
223
 
@@ -175,7 +227,7 @@ test("generated dragHandle with SelectableList", () => {
175
227
 
176
228
  const selectabellist = kit.querySelector(".pb_selectable_list_kit");
177
229
  expect(selectabellist).toBeInTheDocument();
178
- const dragHandle = selectabellist.querySelector(".fa-grip-dots-vertical");
230
+ const dragHandle = selectabellist.querySelector(".pb_custom_icon");
179
231
  expect(dragHandle).toBeInTheDocument();
180
232
  });
181
233
 
@@ -185,6 +237,22 @@ test("generated dragHandle with Card", () => {
185
237
 
186
238
  const card = kit.querySelector(".pb_card_kit_deselected_border_radius_md");
187
239
  expect(card).toBeInTheDocument();
188
- const dragHandle = card.querySelector(".fa-grip-dots-vertical");
240
+ const dragHandle = card.querySelector(".pb_custom_icon");
189
241
  expect(dragHandle).toBeInTheDocument();
190
242
  });
243
+
244
+ test("line dropZone with default direction applies 'line_vertical' class to container", () => {
245
+ render(<DraggableWithLineVertical />);
246
+ const kit = screen.getByTestId(testId);
247
+ const container = kit.querySelector(".pb_draggable_container");
248
+
249
+ expect(container).toHaveClass("line_vertical");
250
+ });
251
+
252
+ test("line dropZone with horizontal direction applies 'line_horizontal' class to container", () => {
253
+ render(<DraggableWithLineHorizontal />);
254
+ const kit = screen.getByTestId(testId);
255
+ const container = kit.querySelector(".pb_draggable_container");
256
+
257
+ expect(container).toHaveClass("line_horizontal");
258
+ });
@@ -31,7 +31,7 @@ const DraggableContainer = (props: DraggableContainerProps) => {
31
31
  } = contextValues;
32
32
 
33
33
  // Only get direction if dropZone is 'line'
34
- const direction = dropZone === 'line' ? (contextValues.direction || 'vertical') : 'vertical';
34
+ const direction = dropZone === 'line' ? (contextValues.direction || 'vertical') : null;
35
35
 
36
36
  const ariaProps = buildAriaProps(aria);
37
37
  const dataProps = buildDataProps(data);
@@ -41,8 +41,9 @@ const DraggableContainer = (props: DraggableContainerProps) => {
41
41
  const classes = classnames(
42
42
  buildCss("pb_draggable_container"),
43
43
  `${activeContainer === container ? "active" : ""}`,
44
- // Only add vertical class if dropZone is 'line' and direction is 'vertical'
45
- (dropZone === 'line' && direction === 'vertical') ? 'vertical' : '',
44
+ // Line variant gets line_{direction} classname on container no matter what
45
+ dropZone === 'line' && direction === 'vertical' ? 'line_vertical' : '',
46
+ dropZone === 'line' && direction === 'horizontal' ? 'line_horizontal' : '',
46
47
  globalProps(props),
47
48
  className
48
49
  );
@@ -12,7 +12,7 @@ const DropdownWithAutocomplete = (props) => {
12
12
  label: "Jasper Furniss",
13
13
  value: "Jasper Furniss",
14
14
  territory: "PHL",
15
- title: "Senior UX Engineer",
15
+ title: "Lead UX Engineer",
16
16
  id: "jasper-furniss",
17
17
  status: "Offline"
18
18
  },
@@ -25,18 +25,18 @@ const DropdownWithAutocomplete = (props) => {
25
25
  status: "Away"
26
26
  },
27
27
  {
28
- label: "Jason Cypret",
29
- value: "Jason Cypret",
28
+ label: "Carlos Lima",
29
+ value: "Carlos Lima",
30
30
  territory: "PHL",
31
- title: "VP of User Experience",
32
- id: "jason-cypret",
31
+ title: "Nitro Developer",
32
+ id: "carlos-lima",
33
33
  status: "Online"
34
34
  },
35
35
  {
36
36
  label: "Courtney Long",
37
37
  value: "Courtney Long",
38
38
  territory: "PHL",
39
- title: "UX Design Mentor",
39
+ title: "Lead UX Designer",
40
40
  id: "courtney-long",
41
41
  status: "Online"
42
42
  }
@@ -15,7 +15,7 @@ const DropdownWithAutocompleteAndCustomDisplay = (props) => {
15
15
  label: "Jasper Furniss",
16
16
  value: "Jasper Furniss",
17
17
  territory: "PHL",
18
- title: "Senior UX Engineer",
18
+ title: "Lead UX Engineer",
19
19
  id: "jasper-furniss",
20
20
  status: "Offline"
21
21
  },
@@ -28,18 +28,18 @@ const DropdownWithAutocompleteAndCustomDisplay = (props) => {
28
28
  status: "Away"
29
29
  },
30
30
  {
31
- label: "Jason Cypret",
32
- value: "Jason Cypret",
31
+ label: "Carlos Lima",
32
+ value: "Carlos Lima",
33
33
  territory: "PHL",
34
- title: "VP of User Experience",
35
- id: "jason-cypret",
34
+ title: "Nitro Developer",
35
+ id: "carlos-lima",
36
36
  status: "Online"
37
37
  },
38
38
  {
39
39
  label: "Courtney Long",
40
40
  value: "Courtney Long",
41
41
  territory: "PHL",
42
- title: "UX Design Mentor",
42
+ title: "Lead UX Designer",
43
43
  id: "courtney-long",
44
44
  status: "Online"
45
45
  }
@@ -15,7 +15,7 @@ const DropdownWithCustomDisplay = (props) => {
15
15
  label: "Jasper Furniss",
16
16
  value: "Jasper Furniss",
17
17
  territory: "PHL",
18
- title: "Senior UX Engineer",
18
+ title: "Lead UX Engineer",
19
19
  id: "jasper-furniss",
20
20
  status: "Offline"
21
21
  },
@@ -28,18 +28,18 @@ const DropdownWithCustomDisplay = (props) => {
28
28
  status: "Away"
29
29
  },
30
30
  {
31
- label: "Jason Cypret",
32
- value: "Jason Cypret",
31
+ label: "Carlos Lima",
32
+ value: "Carlos Lima",
33
33
  territory: "PHL",
34
- title: "VP of User Experience",
35
- id: "jason-cypret",
34
+ title: "Nitro Developer",
35
+ id: "carlos-lima",
36
36
  status: "Online"
37
37
  },
38
38
  {
39
39
  label: "Courtney Long",
40
40
  value: "Courtney Long",
41
41
  territory: "PHL",
42
- title: "UX Design Mentor",
42
+ title: "Lead UX Designer",
43
43
  id: "courtney-long",
44
44
  status: "Online"
45
45
  }
@@ -1,10 +1,10 @@
1
1
  <%
2
- options = [
2
+ options = [
3
3
  {
4
4
  label: "Jasper Furniss",
5
5
  value: "Jasper Furniss",
6
6
  territory: "PHL",
7
- title: "Senior UX Engineer",
7
+ title: "Lead UX Engineer",
8
8
  id: "jasper-furniss",
9
9
  status: "Offline"
10
10
  },
@@ -17,22 +17,22 @@
17
17
  status: "Away"
18
18
  },
19
19
  {
20
- label: "Jason Cypret",
21
- value: "Jason Cypret",
20
+ label: "Carlos Lima",
21
+ value: "Carlos Lima",
22
22
  territory: "PHL",
23
- title: "VP of User Experience",
24
- id: "jason-cypret",
23
+ title: "Nitro Developer",
24
+ id: "carlos-lima",
25
25
  status: "Online"
26
26
  },
27
27
  {
28
28
  label: "Courtney Long",
29
29
  value: "Courtney Long",
30
30
  territory: "PHL",
31
- title: "UX Design Mentor",
31
+ title: "Lead UX Designer",
32
32
  id: "courtney-long",
33
33
  status: "Online"
34
34
  }
35
- ]
35
+ ];
36
36
 
37
37
  %>
38
38
 
@@ -95,7 +95,7 @@ test('generated customDisplay for trigger', () => {
95
95
 
96
96
  const kit = screen.getByTestId(testId)
97
97
  const trigger = kit.querySelector('.pb_dropdown_trigger')
98
- const customDisplay = trigger.querySelector('.fa-flag.pb_icon_kit.fa-fw')
98
+ const customDisplay = trigger.querySelector('.pb_custom_icon')
99
99
  expect(customDisplay).toBeInTheDocument()
100
100
  })
101
101
 
@@ -170,7 +170,7 @@ test('generated custom Trigger', () => {
170
170
  options={options}
171
171
  >
172
172
  <Dropdown.Trigger>
173
- <Icon icon="elephant" />
173
+ <Icon icon="flag" />
174
174
  </Dropdown.Trigger>
175
175
  {options.map((option) => (
176
176
  <Dropdown.Option key={option.id}
@@ -182,7 +182,7 @@ test('generated custom Trigger', () => {
182
182
 
183
183
  const kit = screen.getByTestId(testId)
184
184
  const trigger = kit.querySelector('.pb_dropdown_trigger')
185
- const customTrigger = trigger.querySelector('.fa-elephant.pb_icon_kit.fa-fw')
185
+ const customTrigger = trigger.querySelector('.pb_custom_icon')
186
186
  expect(customTrigger).toBeInTheDocument()
187
187
  })
188
188
 
@@ -205,4 +205,26 @@
205
205
  border-top-left-radius: 0;
206
206
  }
207
207
  }
208
+
209
+ .pb_text_input_kit.error {
210
+ .text_input_wrapper {
211
+ input:focus {
212
+ outline: none;
213
+ }
214
+ }
215
+
216
+ & + * input,
217
+ & + * select {
218
+ border-left-color: $red;
219
+ }
220
+ }
221
+
222
+ .pb_text_input_kit:not(.error):focus-within + .error,
223
+ .pb_text_input_kit:not(.error):focus-within + .pb_select .error {
224
+ input,
225
+ select {
226
+ border-left: none;
227
+ padding-left: calc(var(--iti-flag-width) + 1px);
228
+ }
229
+ }
208
230
  }
@@ -16,7 +16,7 @@ describe("Icon Kit", () => {
16
16
  )
17
17
 
18
18
  const kit = screen.getByTestId(testId)
19
- expect(kit).toHaveClass("fa-user pb_icon_kit fa-fw far")
19
+ expect(kit).toHaveClass("pb_custom_icon svg-inline--fa svg_fw")
20
20
  })
21
21
 
22
22
  test("renders rotate prop", () => {[
@@ -31,7 +31,7 @@ describe("Icon Kit", () => {
31
31
  )
32
32
 
33
33
  const kit = screen.getByTestId(testId)
34
- expect(kit).toHaveClass(`fa-user pb_icon_kit fa-fw fa-rotate-${rotateProp} far`)
34
+ expect(kit).toHaveClass(`pb_custom_icon svg-inline--fa rotate_${rotateProp} svg_fw`)
35
35
 
36
36
  cleanup()
37
37
  })
@@ -48,7 +48,7 @@ describe("Icon Kit", () => {
48
48
  )
49
49
 
50
50
  const kit = screen.getByTestId(testId)
51
- expect(kit).toHaveClass("fa-user pb_icon_kit fa-fw fa-flip-horizontal far")
51
+ expect(kit).toHaveClass("pb_custom_icon svg-inline--fa flip_horizontal svg_fw")
52
52
  })
53
53
 
54
54
 
@@ -63,7 +63,7 @@ describe("Icon Kit", () => {
63
63
  )
64
64
 
65
65
  const kit = screen.getByTestId(testId)
66
- expect(kit).toHaveClass("fa-spinner pb_icon_kit fa-fw fa-spin far")
66
+ expect(kit).toHaveClass("pb_custom_icon svg-inline--fa spin svg_fw")
67
67
  })
68
68
 
69
69
  test("renders pull icon", () => {
@@ -77,7 +77,7 @@ describe("Icon Kit", () => {
77
77
  )
78
78
 
79
79
  const kit = screen.getByTestId(testId)
80
- expect(kit).toHaveClass("fa-arrow-left pb_icon_kit fa-fw fa-pull-left far")
80
+ expect(kit).toHaveClass("pb_custom_icon svg-inline--fa svg_fw pull_left")
81
81
  })
82
82
 
83
83
  test("renders pull icon", () => {
@@ -91,7 +91,7 @@ describe("Icon Kit", () => {
91
91
  )
92
92
 
93
93
  const kit = screen.getByTestId(testId)
94
- expect(kit).toHaveClass("fa-arrow-left pb_icon_kit fa-fw fa-pull-left far")
94
+ expect(kit).toHaveClass("pb_custom_icon svg-inline--fa svg_fw pull_left")
95
95
  })
96
96
 
97
97
  test("renders border around icon", () => {
@@ -105,7 +105,7 @@ describe("Icon Kit", () => {
105
105
  )
106
106
 
107
107
  const kit = screen.getByTestId(testId)
108
- expect(kit).toHaveClass("fa-user pb_icon_kit fa-border fa-fw far")
108
+ expect(kit).toHaveClass("pb_custom_icon svg-inline--fa svg_border svg_fw")
109
109
  })
110
110
 
111
111
  test("renders size prop", () => {
@@ -132,7 +132,7 @@ describe("Icon Kit", () => {
132
132
  )
133
133
 
134
134
  const kit = screen.getByTestId(testId)
135
- expect(kit).toHaveClass(`pb_icon_kit fa-user fa-fw fa-${sizeProp} far`)
135
+ expect(kit).toHaveClass(`pb_custom_icon svg-inline--fa svg_${sizeProp} svg_fw`)
136
136
 
137
137
  cleanup()
138
138
  })
@@ -149,7 +149,7 @@ describe("Icon Kit", () => {
149
149
  )
150
150
 
151
151
  const kit = screen.getByTestId(testId)
152
- expect(kit).toHaveClass("fa-user pb_icon_kit fa-fw fas")
152
+ expect(kit).toHaveClass("pb_custom_icon svg-inline--fa svg_fw")
153
153
  })
154
154
 
155
155
  test("renders with color prop", () => {
@@ -29,7 +29,7 @@ describe("IconCircle Kit", () => {
29
29
  )
30
30
 
31
31
  const kit = screen.getByTestId(testId)
32
- const icon = kit.querySelector('.pb_icon_kit')
32
+ const icon = kit.querySelector('.pb_custom_icon')
33
33
  expect(icon).toBeInTheDocument()
34
34
  })
35
35
 
@@ -33,7 +33,7 @@ describe("IconStatValue Kit", () => {
33
33
  )
34
34
 
35
35
  const kit = screen.getByTestId(testId)
36
- const icon = kit.querySelector(".fa-lightbulb-on.pb_icon_kit.fa-fw")
36
+ const icon = kit.querySelector(".pb_custom_icon")
37
37
  expect(icon).toBeInTheDocument()
38
38
  })
39
39
 
@@ -29,7 +29,7 @@ describe("IconValue Kit", () => {
29
29
  )
30
30
 
31
31
  const kit = screen.getByTestId(testId)
32
- const icon = kit.querySelector(".fa-clipboard.pb_icon_kit.fa-fw")
32
+ const icon = kit.querySelector(".pb_custom_icon")
33
33
  expect(icon).toBeInTheDocument()
34
34
  })
35
35
 
@@ -56,7 +56,7 @@ describe("LabelValue Kit", () => {
56
56
  />
57
57
  )
58
58
  const kit = screen.getByTestId(testId)
59
- const icon = kit.querySelector(".fa-truck.pb_icon_kit.fa-fw")
59
+ const icon = kit.querySelector(".pb_custom_icon")
60
60
  expect(icon).toBeInTheDocument()
61
61
  })
62
62