playbook_ui 14.15.0.pre.alpha.play1910emptystatekitreactbeta6579 → 14.15.0.pre.alpha.play1917lodashremoval2of36615

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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +2 -4
  3. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +1 -1
  4. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +1 -1
  5. data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.tsx +2 -1
  6. data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +1 -1
  7. data/app/pb_kits/playbook/pb_lightbox/Carousel/Slide.tsx +1 -1
  8. data/app/pb_kits/playbook/pb_lightbox/Carousel/Slides.tsx +1 -1
  9. data/app/pb_kits/playbook/pb_lightbox/Carousel/Thumbnails.tsx +1 -1
  10. data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +1 -1
  11. data/app/pb_kits/playbook/pb_popover/_popover.tsx +1 -1
  12. data/app/pb_kits/playbook/pb_popover/popover.test.js +1 -1
  13. data/app/pb_kits/playbook/pb_text_input/inputMask.ts +2 -3
  14. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_icon_rails.html.erb +22 -0
  15. data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +1 -0
  16. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +1 -1
  17. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +16 -4
  18. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.jsx +66 -0
  19. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.md +1 -0
  20. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_custom_options.jsx +1 -1
  21. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.jsx +1 -1
  22. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +1 -0
  23. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
  24. data/app/pb_kits/playbook/utilities/object.test.js +139 -1
  25. data/app/pb_kits/playbook/utilities/object.ts +74 -0
  26. data/app/pb_kits/playbook/utilities/text.ts +1 -1
  27. data/dist/chunks/_typeahead-CdVbIURO.js +36 -0
  28. data/dist/chunks/_weekday_stacked-BSTKfYPJ.js +45 -0
  29. data/dist/chunks/{lib-5OzNgeeu.js → lib-e7oBFFDo.js} +2 -2
  30. data/dist/chunks/{pb_form_validation-DGhKbZtO.js → pb_form_validation-CMXevI1t.js} +1 -1
  31. data/dist/chunks/vendor.js +1 -1
  32. data/dist/menu.yml +0 -8
  33. data/dist/playbook-doc.js +1 -1
  34. data/dist/playbook-rails-react-bindings.js +1 -1
  35. data/dist/playbook-rails.js +1 -1
  36. data/dist/playbook.css +1 -1
  37. data/lib/playbook/version.rb +1 -1
  38. metadata +9 -15
  39. data/app/pb_kits/playbook/pb_empty_state/_empty_state.scss +0 -38
  40. data/app/pb_kits/playbook/pb_empty_state/_empty_state.tsx +0 -199
  41. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_alignment.jsx +0 -38
  42. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_orientation.jsx +0 -19
  43. data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_size.jsx +0 -35
  44. data/app/pb_kits/playbook/pb_empty_state/docs/example.yml +0 -7
  45. data/app/pb_kits/playbook/pb_empty_state/docs/index.js +0 -3
  46. data/app/pb_kits/playbook/pb_empty_state/empty_state.test.jsx +0 -17
  47. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_icon.erb +0 -10
  48. data/dist/chunks/_typeahead-D2Wtk1Vx.js +0 -36
  49. data/dist/chunks/_weekday_stacked-toeDpRDd.js +0 -45
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.15.0"
5
- VERSION = "14.15.0.pre.alpha.play1910emptystatekitreactbeta6579"
5
+ VERSION = "14.15.0.pre.alpha.play1917lodashremoval2of36615"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.15.0.pre.alpha.play1910emptystatekitreactbeta6579
4
+ version: 14.15.0.pre.alpha.play1917lodashremoval2of36615
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-03-10 00:00:00.000000000 Z
12
+ date: 2025-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -1308,14 +1308,6 @@ files:
1308
1308
  - app/pb_kits/playbook/pb_dropdown/utilities/clickOutsideHelper.tsx
1309
1309
  - app/pb_kits/playbook/pb_dropdown/utilities/index.ts
1310
1310
  - app/pb_kits/playbook/pb_dropdown/utilities/subComponentHelper.tsx
1311
- - app/pb_kits/playbook/pb_empty_state/_empty_state.scss
1312
- - app/pb_kits/playbook/pb_empty_state/_empty_state.tsx
1313
- - app/pb_kits/playbook/pb_empty_state/docs/_empty_state_alignment.jsx
1314
- - app/pb_kits/playbook/pb_empty_state/docs/_empty_state_orientation.jsx
1315
- - app/pb_kits/playbook/pb_empty_state/docs/_empty_state_size.jsx
1316
- - app/pb_kits/playbook/pb_empty_state/docs/example.yml
1317
- - app/pb_kits/playbook/pb_empty_state/docs/index.js
1318
- - app/pb_kits/playbook/pb_empty_state/empty_state.test.jsx
1319
1311
  - app/pb_kits/playbook/pb_enhanced_element/element_observer.ts
1320
1312
  - app/pb_kits/playbook/pb_enhanced_element/index.ts
1321
1313
  - app/pb_kits/playbook/pb_file_upload/_file_upload.scss
@@ -3134,9 +3126,9 @@ files:
3134
3126
  - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_delay.md
3135
3127
  - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_delay_rails.html.erb
3136
3128
  - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_delay_rails.md
3137
- - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_icon.erb
3138
3129
  - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_icon.jsx
3139
3130
  - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_icon.md
3131
+ - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_icon_rails.html.erb
3140
3132
  - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_interaction.html.erb
3141
3133
  - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_interaction.jsx
3142
3134
  - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_interaction.md
@@ -3213,6 +3205,8 @@ files:
3213
3205
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.jsx
3214
3206
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.html.erb
3215
3207
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.jsx
3208
+ - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.jsx
3209
+ - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.md
3216
3210
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.html.erb
3217
3211
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.jsx
3218
3212
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.md
@@ -3411,11 +3405,11 @@ files:
3411
3405
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3412
3406
  - app/pb_kits/playbook/utilities/text.ts
3413
3407
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3414
- - dist/chunks/_typeahead-D2Wtk1Vx.js
3415
- - dist/chunks/_weekday_stacked-toeDpRDd.js
3408
+ - dist/chunks/_typeahead-CdVbIURO.js
3409
+ - dist/chunks/_weekday_stacked-BSTKfYPJ.js
3416
3410
  - dist/chunks/lazysizes-B7xYodB-.js
3417
- - dist/chunks/lib-5OzNgeeu.js
3418
- - dist/chunks/pb_form_validation-DGhKbZtO.js
3411
+ - dist/chunks/lib-e7oBFFDo.js
3412
+ - dist/chunks/pb_form_validation-CMXevI1t.js
3419
3413
  - dist/chunks/vendor.js
3420
3414
  - dist/menu.yml
3421
3415
  - dist/playbook-doc.js
@@ -1,38 +0,0 @@
1
- .pb_empty_state_kit {
2
-
3
- .sm-state-vertical {
4
- width: 150px;
5
- }
6
-
7
- .md-state-vertical {
8
- width: 300px;
9
- }
10
-
11
- .lg-state-vertical {
12
- width: 450px;
13
- }
14
-
15
- .sm-state-horizontal {
16
- width: max-content;
17
- max-width: 400px;
18
- .pb_flex_item_kit {
19
- align-self: end;
20
- }
21
- }
22
-
23
- .md-state-horizontal {
24
- width: max-content;
25
- max-width: 600px;
26
- .pb_flex_item_kit {
27
- align-self: end;
28
- }
29
- }
30
-
31
- .lg-state-horizontal {
32
- width: max-content;
33
- .pb_flex_item_kit {
34
- align-self: end;
35
- }
36
- }
37
-
38
- }
@@ -1,199 +0,0 @@
1
-
2
- import React from "react"
3
- import classnames from "classnames"
4
- import { buildAriaProps, buildCss, buildDataProps } from "../utilities/props"
5
- import { globalProps } from "../utilities/globalProps"
6
- import Title from "../pb_title/_title"
7
- import Body from "../pb_body/_body"
8
- import Button from "../pb_button/_button"
9
- import Detail from "../pb_detail/_detail"
10
- import Flex from "../pb_flex/_flex"
11
- import FlexItem from "../pb_flex/_flex_item"
12
- import Image from "../pb_image/_image"
13
-
14
- type EventHandler = (React.MouseEventHandler<HTMLElement>)
15
-
16
- type EmptyStateProps = {
17
- aria?: { [key: string]: string },
18
- alignment?: "center" | "left" | "right",
19
- className?: string,
20
- data?: { [key: string]: string },
21
- description?: string,
22
- header?: string,
23
- id?: string,
24
- image?: string,
25
- linkButton?: string,
26
- onLinkButtonClick?: EventHandler,
27
- onPrimaryButtonClick?: EventHandler,
28
- orientation?: "horizontal" | "vertical",
29
- primaryButton?: string,
30
- size?: "sm" | "md" | "lg",
31
- }
32
-
33
- const EmptyState = (props: EmptyStateProps) => {
34
- const {
35
- aria = {},
36
- alignment = "center",
37
- className,
38
- data = {},
39
- description,
40
- header = "",
41
- id,
42
- image,
43
- linkButton,
44
- onLinkButtonClick,
45
- onPrimaryButtonClick,
46
- orientation = "vertical",
47
- primaryButton,
48
- size = "md",
49
- } = props
50
-
51
- const ariaProps = buildAriaProps(aria)
52
- const dataProps = buildDataProps(data)
53
- const classes = classnames(buildCss("pb_empty_state_kit"), globalProps(props), className)
54
-
55
- const renderContent = () => {
56
- const sizeConfigs = {
57
- sm: {
58
- vertical: {
59
- imageWidth: "100px",
60
- titleSize: 4,
61
- titlePadding: "xxs",
62
- descriptionPadding: "sm",
63
- buttonSize: "sm",
64
- buttonMargin: "xs",
65
- scssClassName: "sm-state-vertical",
66
- column: "column",
67
- },
68
- horizontal: {
69
- imageWidth: "100px",
70
- titleSize: 4,
71
- titlePadding: "xxs",
72
- descriptionPadding: "sm",
73
- buttonSize: "sm",
74
- buttonMargin: "xs",
75
- scssClassName: "sm-state-horizontal",
76
- column: "",
77
- },
78
- },
79
- md: {
80
- vertical: {
81
- imageWidth: "140px",
82
- titleSize: 3,
83
- titlePadding: "xs",
84
- descriptionPadding: "md",
85
- buttonSize: "md",
86
- buttonMargin: "sm",
87
- scssClassName: "md-state-vertical",
88
- column: "column",
89
- },
90
- horizontal: {
91
- imageWidth: "140px",
92
- titleSize: 3,
93
- titlePadding: "xs",
94
- descriptionPadding: "md",
95
- buttonSize: "md",
96
- buttonMargin: "sm",
97
- scssClassName: "md-state-horizontal",
98
- column: "",
99
- },
100
- },
101
- lg: {
102
- vertical: {
103
- imageWidth: "100%",
104
- titleSize: 2,
105
- titlePadding: "sm",
106
- descriptionPadding: "lg",
107
- buttonSize: "md",
108
- buttonMargin: "md",
109
- scssClassName: "lg-state-vertical",
110
- column: "column",
111
- },
112
- horizontal: {
113
- imageWidth: "100%",
114
- titleSize: 2,
115
- titlePadding: "sm",
116
- descriptionPadding: "lg",
117
- buttonSize: "md",
118
- buttonMargin: "md",
119
- scssClassName: "lg-state-horizontal",
120
- column: "",
121
- },
122
- },
123
- };
124
-
125
- const configs = sizeConfigs[size]?.[orientation]
126
- const alignFlex = alignment === "center" ? "center" : alignment === "right" ? "end" : "start"
127
- const alignText = alignment === "center" ? "center" : alignment === "right" ? "right" : undefined
128
-
129
-
130
- const layout = (
131
- <div {...ariaProps}
132
- {...dataProps}
133
- className={classes}
134
- id={id}
135
- >
136
- <Flex align={alignFlex}
137
- className={configs.scssClassName}
138
- orientation={configs.column as "column" | "row" | undefined}
139
- paddingLeft="xl"
140
- paddingRight="xl"
141
- vertical="center"
142
- >
143
- { image ? (
144
- <Image
145
- alt="test"
146
- htmlOptions={{ width: configs.imageWidth, height: "auto", alignment: "start" }}
147
- url={image}
148
- />
149
- ) : null }
150
-
151
- <FlexItem >
152
- <Title paddingBottom={configs.titlePadding as "xxs" | "xs" | "sm" | undefined}
153
- size={configs.titleSize as 1 | 2 | 3 | 4 | undefined}
154
- text={header}
155
- textAlign={alignText}
156
- />
157
-
158
- {size !== "sm" ? (
159
- <Body paddingBottom={configs.descriptionPadding as "sm" | "md" | "lg" | undefined}
160
- text={description}
161
- textAlign={alignText}
162
- />
163
- ) : (
164
- <Detail paddingBottom={configs.descriptionPadding as "sm" | "md" | "lg" | undefined}
165
- text={description}
166
- textAlign={alignText}
167
- />
168
- )}
169
-
170
- { primaryButton ? (
171
- <Button
172
- marginBottom={configs.buttonMargin as "xs" | "sm" | "md" | undefined}
173
- onClick={onPrimaryButtonClick}
174
- size={configs.buttonSize as "sm" | "md" | undefined}
175
- text={primaryButton}
176
- variant="primary"
177
- width="100%"
178
- />
179
- ) : null }
180
-
181
- { linkButton ? (
182
- <Button onClick={onLinkButtonClick}
183
- size={configs.buttonSize as "sm" | "md" | undefined}
184
- text={linkButton}
185
- variant="link"
186
- width="100%"
187
- />
188
- ) : null }
189
-
190
- </FlexItem>
191
- </Flex>
192
- </div>
193
- )
194
- return layout
195
- }
196
- return renderContent()
197
- }
198
-
199
- export default EmptyState
@@ -1,38 +0,0 @@
1
- import React from 'react'
2
- import { EmptyState, Flex } from 'playbook-ui'
3
-
4
- const EmptyStateAlignment = (props) => (
5
- <Flex align="center"
6
- spacing="evenly"
7
- >
8
- <EmptyState
9
- {...props}
10
- alignment="left"
11
- description="Body text goes into detail with possible steps for user to take"
12
- header="Title Explains"
13
- image="https://component.gallery/static/8d36eaa25b6dcb026685101ebc379022/Empty%20state%20icon..svg"
14
- primaryButton="Next Action"
15
- size="md"
16
- />
17
- <EmptyState
18
- {...props}
19
- alignment="center"
20
- description="Body text goes into detail with possible steps for user to take"
21
- header="Title Explains"
22
- image="https://component.gallery/static/8d36eaa25b6dcb026685101ebc379022/Empty%20state%20icon..svg"
23
- primaryButton="Next Action"
24
- size="md"
25
- />
26
- <EmptyState
27
- {...props}
28
- alignment="right"
29
- description="Body text goes into detail with possible steps for user to take"
30
- header="Title Explains"
31
- image="https://component.gallery/static/8d36eaa25b6dcb026685101ebc379022/Empty%20state%20icon..svg"
32
- primaryButton="Next Action"
33
- size="md"
34
- />
35
- </Flex>
36
- )
37
-
38
- export default EmptyStateAlignment
@@ -1,19 +0,0 @@
1
- import React from 'react'
2
- import { EmptyState, Flex } from 'playbook-ui'
3
-
4
- const EmptyStateOrientation = (props) => (
5
- <Flex align="center">
6
- <EmptyState
7
- {...props}
8
- alignment="left"
9
- description="Body text goes into detail with possible steps for user to take"
10
- header="Title Explains"
11
- image="https://component.gallery/static/8d36eaa25b6dcb026685101ebc379022/Empty%20state%20icon..svg"
12
- orientation="horizontal"
13
- primaryButton="Next Action"
14
- size="lg"
15
- />
16
- </Flex>
17
- )
18
-
19
- export default EmptyStateOrientation
@@ -1,35 +0,0 @@
1
- import React from 'react'
2
- import { EmptyState, Flex } from 'playbook-ui'
3
-
4
- const EmptyStateSize = (props) => (
5
- <Flex align="center"
6
- spacing="evenly"
7
- >
8
- <EmptyState
9
- {...props}
10
- alignment="center"
11
- description="Body text goes into detail with possible steps for user to take"
12
- header="Title Explains"
13
- image="https://component.gallery/static/8d36eaa25b6dcb026685101ebc379022/Empty%20state%20icon..svg"
14
- linkButton="Alt Action"
15
- onLinkButtonClick={() => alert("link button clicked!")}
16
- onPrimaryButtonClick={() => alert("primary button clicked!")}
17
- primaryButton="Next Action"
18
- size="sm"
19
- />
20
- <EmptyState
21
- {...props}
22
- alignment="center"
23
- description="Body text goes into detail with possible steps for user to take"
24
- header="Title Explains"
25
- image="https://component.gallery/static/8d36eaa25b6dcb026685101ebc379022/Empty%20state%20icon..svg"
26
- linkButton="Alt Action"
27
- onLinkButtonClick={() => alert("link button clicked!")}
28
- onPrimaryButtonClick={() => alert("primary button clicked!")}
29
- primaryButton="Next Action"
30
- size="lg"
31
- />
32
- </Flex>
33
- )
34
-
35
- export default EmptyStateSize
@@ -1,7 +0,0 @@
1
- examples:
2
-
3
-
4
- react:
5
- - empty_state_size: Size
6
- - empty_state_orientation: Orientation
7
- - empty_state_alignment: Alignment
@@ -1,3 +0,0 @@
1
- export { default as EmptyStateOrientation } from './_empty_state_orientation.jsx'
2
- export { default as EmptyStateSize } from './_empty_state_size.jsx'
3
- export { default as EmptyStateAlignment } from './_empty_state_alignment.jsx'
@@ -1,17 +0,0 @@
1
- import React from 'react'
2
- import { render, screen } from '../utilities/test-utils'
3
-
4
- import { EmptyState } from 'playbook-ui'
5
-
6
-
7
- test('returns namespaced class name', () => {
8
- render(
9
- <EmptyState
10
- data={{ testid: 'primary-test' }}
11
- text="some text"
12
- />
13
- )
14
-
15
- const kit = screen.getByTestId('primary-test')
16
- expect(kit).toHaveClass('pb_empty_state_kit')
17
- })
@@ -1,10 +0,0 @@
1
- <%= pb_rails("icon_circle", props: { icon: "paper-plane", id: "result-1-sample-email-link" }) %>
2
-
3
- <%= pb_rails("tooltip", props: {
4
- trigger_element_id: "result-1-sample-email-link",
5
- tooltip_id: "sample-email-tooltip-result-1",
6
- position: "top",
7
- dark: true
8
- }) do %>
9
- Send Email
10
- <% end %>