playbook_ui 8.2.0.pre.alpha1 → 8.2.1.pre.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -0
  3. data/app/pb_kits/playbook/_playbook.scss +2 -0
  4. data/app/pb_kits/playbook/data/menu.yml +3 -1
  5. data/app/pb_kits/playbook/index.js +2 -0
  6. data/app/pb_kits/playbook/pb_avatar/_avatar.jsx +14 -2
  7. data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +1 -1
  8. data/app/pb_kits/playbook/pb_avatar/avatar.rb +5 -2
  9. data/app/pb_kits/playbook/pb_avatar/avatar.test.js +5 -2
  10. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_default.html.erb +5 -0
  11. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_default.jsx +5 -0
  12. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_status.html.erb +4 -0
  13. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_status.jsx +4 -0
  14. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.jsx +6 -0
  15. data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.html.erb +2 -1
  16. data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.rb +2 -0
  17. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.html.erb +4 -0
  18. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.jsx +4 -0
  19. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.html.erb +2 -0
  20. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.jsx +2 -0
  21. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_on_click.jsx +2 -0
  22. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_onclick.html.erb +2 -0
  23. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.html.erb +8 -0
  24. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.jsx +8 -0
  25. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_tooltip.html.erb +2 -0
  26. data/app/pb_kits/playbook/pb_avatar_action_button/pb_avatar_action_button.test.js +31 -0
  27. data/app/pb_kits/playbook/pb_badge/_badge.jsx +26 -1
  28. data/app/pb_kits/playbook/pb_button/_button.jsx +6 -0
  29. data/app/pb_kits/playbook/pb_button/button.test.js +91 -0
  30. data/app/pb_kits/playbook/pb_button/docs/_button_default.jsx +0 -1
  31. data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.test.js +46 -0
  32. data/app/pb_kits/playbook/pb_caption/_caption.jsx +3 -2
  33. data/app/pb_kits/playbook/pb_caption/caption.rb +1 -1
  34. data/app/pb_kits/playbook/pb_card/_card.jsx +18 -3
  35. data/app/pb_kits/playbook/pb_card/card.html.erb +1 -1
  36. data/app/pb_kits/playbook/pb_card/card.rb +3 -0
  37. data/app/pb_kits/playbook/pb_card/docs/_card_tag.html.erb +25 -0
  38. data/app/pb_kits/playbook/pb_card/docs/_card_tag.jsx +59 -0
  39. data/app/pb_kits/playbook/pb_card/docs/example.yml +2 -0
  40. data/app/pb_kits/playbook/pb_card/docs/index.js +1 -0
  41. data/app/pb_kits/playbook/pb_checkbox/_checkbox.jsx +31 -9
  42. data/app/pb_kits/playbook/pb_checkbox/_checkbox.scss +28 -19
  43. data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +11 -3
  44. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +6 -1
  45. data/app/pb_kits/playbook/pb_checkbox/checkbox.test.js +94 -0
  46. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx +0 -1
  47. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +7 -0
  48. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.jsx +16 -0
  49. data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +2 -0
  50. data/app/pb_kits/playbook/pb_checkbox/docs/index.js +1 -0
  51. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.test.js +17 -0
  52. data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +6 -0
  53. data/app/pb_kits/playbook/pb_dialog/_close_icon.jsx +23 -0
  54. data/app/pb_kits/playbook/pb_dialog/_dialog.html.erb +10 -0
  55. data/app/pb_kits/playbook/pb_dialog/_dialog.jsx +142 -0
  56. data/app/pb_kits/playbook/pb_dialog/_dialog.scss +133 -0
  57. data/app/pb_kits/playbook/pb_dialog/_dialog_context.jsx +3 -0
  58. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_body.jsx +21 -0
  59. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx +36 -0
  60. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.jsx +68 -0
  61. data/app/pb_kits/playbook/pb_dialog/dialog.rb +47 -0
  62. data/app/pb_kits/playbook/pb_dialog/dialog.test.jsx +23 -0
  63. data/app/pb_kits/playbook/pb_dialog/dialog_header.rb +31 -0
  64. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.jsx +53 -0
  65. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.md +2 -0
  66. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx +27 -0
  67. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.jsx +27 -0
  68. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.md +2 -0
  69. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_separators.jsx +119 -0
  70. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_separators.md +2 -0
  71. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx +28 -0
  72. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.md +2 -0
  73. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_sizes.jsx +93 -0
  74. data/app/pb_kits/playbook/pb_dialog/docs/example.yml +10 -0
  75. data/app/pb_kits/playbook/pb_dialog/docs/index.js +6 -0
  76. data/app/pb_kits/playbook/pb_form/_form.scss +5 -1
  77. data/app/pb_kits/playbook/pb_form/form_builder.rb +4 -2
  78. data/app/pb_kits/playbook/pb_form/form_builder/action_area.rb +14 -7
  79. data/app/pb_kits/playbook/pb_form/simple_form.html.erb +2 -4
  80. data/app/pb_kits/playbook/pb_form/simple_form.rb +4 -0
  81. data/app/pb_kits/playbook/pb_inline/_inline.jsx +83 -0
  82. data/app/pb_kits/playbook/pb_inline/_inline.scss +58 -0
  83. data/app/pb_kits/playbook/pb_inline/docs/_inline_default.jsx +36 -0
  84. data/app/pb_kits/playbook/pb_inline/docs/_inline_input_options.jsx +58 -0
  85. data/app/pb_kits/playbook/pb_inline/docs/_inline_text_options.jsx +99 -0
  86. data/app/pb_kits/playbook/pb_inline/docs/example.yml +5 -0
  87. data/app/pb_kits/playbook/pb_inline/docs/index.js +3 -0
  88. data/app/pb_kits/playbook/pb_inline/inline.test.jsx +21 -0
  89. data/app/pb_kits/playbook/pb_online_status/_online_status.jsx +2 -0
  90. data/app/pb_kits/playbook/pb_online_status/online_status.html.erb +1 -1
  91. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.jsx +4 -3
  92. data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +3 -0
  93. data/app/pb_kits/playbook/pb_textarea/_textarea.jsx +3 -0
  94. data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +9 -1
  95. data/app/pb_kits/playbook/pb_typeahead/components/Input.jsx +24 -0
  96. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +25 -2
  97. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.jsx +1 -0
  98. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx +8 -3
  99. data/app/pb_kits/playbook/pb_user_badge/_user_badge.jsx +1 -1
  100. data/app/pb_kits/playbook/react_rails_kits.js +4 -0
  101. data/app/pb_kits/playbook/utilities/test-utils.js +6 -0
  102. data/lib/playbook/version.rb +2 -1
  103. metadata +75 -35
  104. data/app/pb_kits/playbook/pb_form/form_builder/action_area.html.erb +0 -3
@@ -0,0 +1,99 @@
1
+ import React, { useState } from 'react'
2
+ import { Body, Caption, Inline, TextInput, Title } from '../../'
3
+
4
+ const InlineTextOptions = (props) => {
5
+ const [formFields, setFormFields] = useState({
6
+ inputOne: 'Input One',
7
+ inputTwo: 'Input Two',
8
+ inputThree: 'Input Three',
9
+ inputFour: 'Input Four',
10
+ })
11
+
12
+ const handleChange = ({ target }) => {
13
+ const { name, value } = target
14
+ setFormFields({ ...formFields, [name]: value })
15
+ }
16
+
17
+ return (
18
+ <div>
19
+ <Inline
20
+ {...props}
21
+ displayKit={
22
+ <Title
23
+ {...props}
24
+ kitType="Title"
25
+ size={1}
26
+ tag="h1"
27
+ text={formFields.inputOne}
28
+ />
29
+ }
30
+ formInput={
31
+ <TextInput
32
+ {...props}
33
+ name="inputOne"
34
+ onChange={handleChange}
35
+ value={formFields.inputOne}
36
+ />
37
+ }
38
+ />
39
+ <Inline
40
+ {...props}
41
+ displayKit={
42
+ <Title
43
+ {...props}
44
+ kitType="Title 4"
45
+ size={4}
46
+ tag="h4"
47
+ text={formFields.inputTwo}
48
+ />
49
+ }
50
+ formInput={
51
+ <TextInput
52
+ {...props}
53
+ name="inputTwo"
54
+ onChange={handleChange}
55
+ value={formFields.inputTwo}
56
+ />
57
+ }
58
+ />
59
+ <Inline
60
+ {...props}
61
+ displayKit={
62
+ <Body
63
+ {...props}
64
+ kitType="Body"
65
+ text={formFields.inputThree}
66
+ />
67
+ }
68
+ formInput={
69
+ <TextInput
70
+ {...props}
71
+ name="inputThree"
72
+ onChange={handleChange}
73
+ value={formFields.inputThree}
74
+ />
75
+ }
76
+ />
77
+ <Inline
78
+ {...props}
79
+ displayKit={
80
+ <Caption
81
+ {...props}
82
+ kitType="Caption"
83
+ text={formFields.inputFour}
84
+ />
85
+ }
86
+ formInput={
87
+ <TextInput
88
+ {...props}
89
+ name="inputFour"
90
+ onChange={handleChange}
91
+ value={formFields.inputFour}
92
+ />
93
+ }
94
+ />
95
+ </div>
96
+ )
97
+ }
98
+
99
+ export default InlineTextOptions
@@ -0,0 +1,5 @@
1
+ examples:
2
+ react:
3
+ - inline_default: Default
4
+ - inline_text_options: Text Options
5
+ - inline_input_options: Input Options
@@ -0,0 +1,3 @@
1
+ export { default as InlineDefault } from './_inline_default.jsx'
2
+ export { default as InlineTextOptions } from './_inline_text_options.jsx'
3
+ export { default as InlineInputOptions } from './_inline_input_options.jsx'
@@ -0,0 +1,21 @@
1
+ import React from 'react'
2
+ import { render, screen } from '../utilities/test-utils'
3
+ import { Inline } from '../'
4
+
5
+ /* See these resources for more testing info:
6
+ - https://github.com/testing-library/jest-dom#usage for useage and examples
7
+ - https://jestjs.io/docs/en/using-matchers
8
+ */
9
+
10
+ test('generated scaffold test - update me', () => {
11
+ const testId = "test1"
12
+
13
+ render(
14
+ <Inline
15
+ data={{ testid: testId }}
16
+ />
17
+ )
18
+
19
+ const kit = screen.getByTestId(testId)
20
+ expect(kit).toBeInTheDocument()
21
+ })
@@ -23,6 +23,8 @@ const OnlineStatus = (props: OnlineStatusProps) => {
23
23
  status = 'offline',
24
24
  } = props
25
25
 
26
+ aria.label = status
27
+
26
28
  const ariaProps = buildAriaProps(aria)
27
29
  const dataProps = buildDataProps(data)
28
30
  const classes = classnames(buildCss('pb_online_status_kit', status), globalProps(props), className)
@@ -1,5 +1,5 @@
1
1
  <%= content_tag(:div,
2
- aria: object.aria,
2
+ aria: object.aria.merge!(label: object.status),
3
3
  class: object.classname,
4
4
  data: object.data,
5
5
  id: object.id) do %>
@@ -1,6 +1,6 @@
1
1
  /* @flow */
2
2
 
3
- import React, { useEffect, useRef } from 'react'
3
+ import React, { forwardRef, useEffect, useRef } from 'react'
4
4
  import classnames from 'classnames'
5
5
  import useFocus from './useFocus.js'
6
6
  import Trix from 'trix'
@@ -22,7 +22,7 @@ type RichTextEditorProps = {
22
22
  value?: string,
23
23
  }
24
24
 
25
- const RichTextEditor = (props: RichTextEditorProps) => {
25
+ const RichTextEditor = (props: RichTextEditorProps, ref: React.ElementRef<"input">) => {
26
26
  const {
27
27
  aria = {},
28
28
  className,
@@ -120,6 +120,7 @@ const RichTextEditor = (props: RichTextEditorProps) => {
120
120
  <input
121
121
  id={id}
122
122
  name={name}
123
+ ref={ref}
123
124
  type="hidden"
124
125
  value={value}
125
126
  />
@@ -133,4 +134,4 @@ const RichTextEditor = (props: RichTextEditorProps) => {
133
134
  )
134
135
  }
135
136
 
136
- export default RichTextEditor
137
+ export default forwardRef(RichTextEditor)
@@ -19,6 +19,7 @@ type TextInputProps = {
19
19
  id?: string,
20
20
  name: string,
21
21
  label: string,
22
+ onBlur: (String) => void,
22
23
  onChange: (String) => void,
23
24
  placeholder: string,
24
25
  required?: boolean,
@@ -41,6 +42,7 @@ const TextInput = (
41
42
  id,
42
43
  name,
43
44
  label,
45
+ onBlur = () => {},
44
46
  onChange = () => {},
45
47
  placeholder,
46
48
  required,
@@ -79,6 +81,7 @@ const TextInput = (
79
81
  disabled={disabled}
80
82
  id={id}
81
83
  name={name}
84
+ onBlur={onBlur}
82
85
  onChange={onChange}
83
86
  placeholder={placeholder}
84
87
  ref={ref}
@@ -24,6 +24,7 @@ type TextareaProps = {
24
24
  required?: boolean,
25
25
  rows?: number,
26
26
  resize: 'none' | 'both' | 'horizontal' | 'vertical' | 'auto',
27
+ onBlur?: InputCallback<HTMLTextAreaElement>,
27
28
  onChange?: InputCallback<HTMLTextAreaElement>,
28
29
  }
29
30
 
@@ -37,6 +38,7 @@ const Textarea = ({
37
38
  label,
38
39
  maxCharacters,
39
40
  name,
41
+ onBlur = () => {},
40
42
  onChange = () => {},
41
43
  placeholder,
42
44
  required,
@@ -75,6 +77,7 @@ const Textarea = ({
75
77
  className="pb_textarea_kit"
76
78
  disabled={disabled}
77
79
  name={name}
80
+ onBlur={onBlur}
78
81
  onChange={onChange}
79
82
  placeholder={placeholder}
80
83
  ref={ref}
@@ -3,12 +3,14 @@
3
3
  import React from 'react'
4
4
  import Select from 'react-select'
5
5
  import AsyncSelect from 'react-select/async'
6
+ import CreateableSelect from 'react-select/creatable'
6
7
  import { get } from 'lodash'
7
8
  import { globalProps } from '../utilities/globalProps.js'
8
9
 
9
10
  import Control from './components/Control'
10
11
  import ClearIndicator from './components/ClearIndicator'
11
12
  import IndicatorsContainer from './components/IndicatorsContainer'
13
+ import Input from './components/Input'
12
14
  import MenuList from './components/MenuList'
13
15
  import MultiValue from './components/MultiValue'
14
16
  import Option from './components/Option'
@@ -26,6 +28,7 @@ import { noop } from '../utilities/props'
26
28
 
27
29
  type Props = {
28
30
  async?: boolean,
31
+ createable?: boolean,
29
32
  dark?: boolean,
30
33
  label?: string,
31
34
  loadOptions?: noop | string,
@@ -41,12 +44,14 @@ type Props = {
41
44
 
42
45
  const Typeahead = (props: Props) => {
43
46
  const selectProps = {
47
+ badges: false,
44
48
  cacheOptions: true,
45
49
  components: {
46
50
  Control,
47
51
  ClearIndicator,
48
52
  IndicatorsContainer,
49
53
  IndicatorSeparator: null,
54
+ Input,
50
55
  MenuList,
51
56
  MultiValue,
52
57
  Option,
@@ -58,6 +63,8 @@ const Typeahead = (props: Props) => {
58
63
  isClearable: true,
59
64
  isSearchable: true,
60
65
  name,
66
+ onCreate: () => {},
67
+ plusIcon: false,
61
68
  ...props,
62
69
  }
63
70
 
@@ -65,7 +72,8 @@ const Typeahead = (props: Props) => {
65
72
  if (typeof(props.getOptionLabel) === 'string') selectProps.getOptionLabel = get(window, props.getOptionLabel)
66
73
  if (typeof(props.getOptionValue) === 'string') selectProps.getOptionValue = get(window, props.getOptionValue)
67
74
 
68
- const Tag = props.async ? AsyncSelect : Select
75
+ let Tag = props.async ? AsyncSelect : Select
76
+ if (props.createable) Tag = CreateableSelect
69
77
 
70
78
  const handleOnChange = (data, { action, option, removedValue }) => {
71
79
  if (action === 'select-option') {
@@ -0,0 +1,24 @@
1
+ /* @flow */
2
+
3
+ import React from 'react'
4
+ import { components } from 'react-select'
5
+ import { Flex, Icon } from '../../'
6
+
7
+ const Input = (props: any) => (
8
+ <Flex
9
+ align="center"
10
+ >
11
+ <If condition={props.selectProps.plusIcon}>
12
+ <Icon
13
+ className="typeahead-plus-icon"
14
+ icon="plus"
15
+ />
16
+ </If>
17
+ <components.Input
18
+ className="input"
19
+ {...props}
20
+ />
21
+ </Flex>
22
+ )
23
+
24
+ export default Input
@@ -3,7 +3,7 @@
3
3
  import React from 'react'
4
4
  import { components } from 'react-select'
5
5
 
6
- import { FormPill } from '../../'
6
+ import { FormPill, Badge } from '../../'
7
7
 
8
8
  type Props = {
9
9
  data: object,
@@ -28,7 +28,7 @@ const MultiValue = (props: Props) => {
28
28
  className="text_input_multivalue_container"
29
29
  {...props}
30
30
  >
31
- <If condition={imageUrl}>
31
+ {/* <If condition={imageUrl}>
32
32
  <FormPill
33
33
  avatarUrl={imageUrl}
34
34
  closeProps={removeProps}
@@ -41,6 +41,29 @@ const MultiValue = (props: Props) => {
41
41
  marginRight="xs"
42
42
  text={label}
43
43
  />
44
+ </If> */}
45
+ <If condition={props.selectProps.badges}>
46
+ <Badge
47
+ closeProps={removeProps}
48
+ removeIcon
49
+ text={label}
50
+ variant="primary"
51
+ />
52
+ <Else />
53
+ <If condition={imageUrl}>
54
+ <FormPill
55
+ avatarUrl={imageUrl}
56
+ closeProps={removeProps}
57
+ marginRight="xs"
58
+ name={label}
59
+ />
60
+ <Else />
61
+ <FormPill
62
+ closeProps={removeProps}
63
+ marginRight="xs"
64
+ text={label}
65
+ />
66
+ </If>
44
67
  </If>
45
68
  </components.MultiValueContainer>
46
69
  )
@@ -13,6 +13,7 @@ const options = [
13
13
  const TypeaheadDefault = (props) => {
14
14
  return (
15
15
  <Typeahead
16
+ // badges
16
17
  label="Colors"
17
18
  options={options}
18
19
  {...props}
@@ -1,9 +1,9 @@
1
1
  /* @flow */
2
2
 
3
- import React from 'react'
3
+ import React, { useState } from 'react'
4
4
  import { Typeahead } from '../..'
5
5
 
6
- const options = [
6
+ const initOptions = [
7
7
  { label: 'Windows', value: '#FFA500' },
8
8
  { label: 'Siding', value: '#FF0000' },
9
9
  { label: 'Doors', value: '#00FF00' },
@@ -11,13 +11,18 @@ const options = [
11
11
  ]
12
12
 
13
13
  const TypeaheadWithPills = (props) => {
14
+ const [values, setValues] = useState([])
14
15
  return (
15
16
  <>
16
17
  <Typeahead
18
+ badges
19
+ createable
17
20
  isMulti
18
21
  label="Colors"
19
- options={options}
22
+ onChange={(value) => console.log(value)}
23
+ options={initOptions}
20
24
  placeholder=""
25
+ plusIcon
21
26
  {...props}
22
27
  />
23
28
  </>
@@ -23,7 +23,7 @@ const UserBadge = (props: UserBadgeProps) => {
23
23
  size = 'md',
24
24
  } = props
25
25
 
26
- const image = require(`./badges/_${badge}.svg`)
26
+ const image = require(`./badges/${badge}.svg`)
27
27
  const ariaProps = buildAriaProps(aria)
28
28
  const dataProps = buildDataProps(data)
29
29
  const classes = classnames(
@@ -5,4 +5,8 @@ export { default as Legend } from './pb_legend/_legend.jsx'
5
5
  export { default as LineGraph } from './pb_line_graph/_line_graph.jsx'
6
6
  export { default as Typeahead } from './pb_typeahead/_typeahead.jsx'
7
7
  export { default as RichTextEditor } from './pb_rich_text_editor/_rich_text_editor.jsx'
8
+ export { default as Dialog } from './pb_dialog/_dialog.jsx'
9
+ export { default as DialogHeader } from './pb_dialog/child_kits/_dialog_header.jsx'
10
+ export { default as DialogBody } from './pb_dialog/child_kits/_dialog_body.jsx'
11
+ export { default as DialogFooter } from './pb_dialog/child_kits/_dialog_footer.jsx'
8
12
  export { KitSearch, SnippetToggle, DarkModeToggle } from './docs_components'
@@ -39,3 +39,9 @@ export const ensureAccessible = async (Kit, props = {}, newProps = {}) => {
39
39
  const html = render()
40
40
  expect(await axe(html)).toHaveNoViolations()
41
41
  }
42
+
43
+ export const appendAlert = (message) => {
44
+ const alertNode = document.createElement('div')
45
+ alertNode.innerHTML = message
46
+ document.querySelector('body').appendChild(alertNode)
47
+ }
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- VERSION = "8.2.0.pre.alpha1"
4
+ VERSION = "8.2.1.pre.alpha1"
5
5
  end
6
+
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.2.0.pre.alpha1
4
+ version: 8.2.1.pre.alpha1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
8
8
  - Power Devs
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-03-02 00:00:00.000000000 Z
12
+ date: 2021-03-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -17,27 +17,27 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 5.1.6
20
+ version: 5.2.4.4
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '6.0'
23
+ version: '7.0'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
28
  - - ">="
29
29
  - !ruby/object:Gem::Version
30
- version: 5.1.6
30
+ version: 5.2.4.4
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '6.0'
33
+ version: '7.0'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: actionview
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 5.1.6
40
+ version: 5.2.4.4
41
41
  - - "<"
42
42
  - !ruby/object:Gem::Version
43
43
  version: '7.0'
@@ -47,7 +47,7 @@ dependencies:
47
47
  requirements:
48
48
  - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: 5.1.6
50
+ version: 5.2.4.4
51
51
  - - "<"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '7.0'
@@ -57,7 +57,7 @@ dependencies:
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 5.1.6
60
+ version: 5.2.4.4
61
61
  - - "<"
62
62
  - !ruby/object:Gem::Version
63
63
  version: '7.0'
@@ -67,24 +67,10 @@ dependencies:
67
67
  requirements:
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
- version: 5.1.6
70
+ version: 5.2.4.4
71
71
  - - "<"
72
72
  - !ruby/object:Gem::Version
73
73
  version: '7.0'
74
- - !ruby/object:Gem::Dependency
75
- name: github_changelog_generator
76
- requirement: !ruby/object:Gem::Requirement
77
- requirements:
78
- - - '='
79
- - !ruby/object:Gem::Version
80
- version: 1.15.2
81
- type: :runtime
82
- prerelease: false
83
- version_requirements: !ruby/object:Gem::Requirement
84
- requirements:
85
- - - '='
86
- - !ruby/object:Gem::Version
87
- version: 1.15.2
88
74
  - !ruby/object:Gem::Dependency
89
75
  name: react-rails
90
76
  requirement: !ruby/object:Gem::Requirement
@@ -253,6 +239,20 @@ dependencies:
253
239
  - - '='
254
240
  - !ruby/object:Gem::Version
255
241
  version: 11.0.0
242
+ - !ruby/object:Gem::Dependency
243
+ name: github_changelog_generator
244
+ requirement: !ruby/object:Gem::Requirement
245
+ requirements:
246
+ - - '='
247
+ - !ruby/object:Gem::Version
248
+ version: 1.15.2
249
+ type: :development
250
+ prerelease: false
251
+ version_requirements: !ruby/object:Gem::Requirement
252
+ requirements:
253
+ - - '='
254
+ - !ruby/object:Gem::Version
255
+ version: 1.15.2
256
256
  - !ruby/object:Gem::Dependency
257
257
  name: overcommit
258
258
  requirement: !ruby/object:Gem::Requirement
@@ -285,22 +285,22 @@ dependencies:
285
285
  name: rspec-rails
286
286
  requirement: !ruby/object:Gem::Requirement
287
287
  requirements:
288
- - - ">="
289
- - !ruby/object:Gem::Version
290
- version: 3.8.0
291
288
  - - "~>"
292
289
  - !ruby/object:Gem::Version
293
290
  version: '3.8'
291
+ - - ">="
292
+ - !ruby/object:Gem::Version
293
+ version: 3.8.0
294
294
  type: :development
295
295
  prerelease: false
296
296
  version_requirements: !ruby/object:Gem::Requirement
297
297
  requirements:
298
- - - ">="
299
- - !ruby/object:Gem::Version
300
- version: 3.8.0
301
298
  - - "~>"
302
299
  - !ruby/object:Gem::Version
303
300
  version: '3.8'
301
+ - - ">="
302
+ - !ruby/object:Gem::Version
303
+ version: 3.8.0
304
304
  - !ruby/object:Gem::Dependency
305
305
  name: rubocop
306
306
  requirement: !ruby/object:Gem::Requirement
@@ -464,6 +464,7 @@ files:
464
464
  - app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_tooltip.html.erb
465
465
  - app/pb_kits/playbook/pb_avatar_action_button/docs/example.yml
466
466
  - app/pb_kits/playbook/pb_avatar_action_button/docs/index.js
467
+ - app/pb_kits/playbook/pb_avatar_action_button/pb_avatar_action_button.test.js
467
468
  - app/pb_kits/playbook/pb_background/_background.jsx
468
469
  - app/pb_kits/playbook/pb_background/_background.scss
469
470
  - app/pb_kits/playbook/pb_background/background.html.erb
@@ -526,6 +527,7 @@ files:
526
527
  - app/pb_kits/playbook/pb_button/_button_mixins.scss
527
528
  - app/pb_kits/playbook/pb_button/button.html.erb
528
529
  - app/pb_kits/playbook/pb_button/button.rb
530
+ - app/pb_kits/playbook/pb_button/button.test.js
529
531
  - app/pb_kits/playbook/pb_button/docs/_button_accessibility.html.erb
530
532
  - app/pb_kits/playbook/pb_button/docs/_button_accessibility.jsx
531
533
  - app/pb_kits/playbook/pb_button/docs/_button_block_content.html.erb
@@ -552,6 +554,7 @@ files:
552
554
  - app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_mixins.scss
553
555
  - app/pb_kits/playbook/pb_button_toolbar/button_toolbar.html.erb
554
556
  - app/pb_kits/playbook/pb_button_toolbar/button_toolbar.rb
557
+ - app/pb_kits/playbook/pb_button_toolbar/button_toolbar.test.js
555
558
  - app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.html.erb
556
559
  - app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.jsx
557
560
  - app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.html.erb
@@ -609,12 +612,15 @@ files:
609
612
  - app/pb_kits/playbook/pb_card/docs/_card_separator.jsx
610
613
  - app/pb_kits/playbook/pb_card/docs/_card_shadow.html.erb
611
614
  - app/pb_kits/playbook/pb_card/docs/_card_shadow.jsx
615
+ - app/pb_kits/playbook/pb_card/docs/_card_tag.html.erb
616
+ - app/pb_kits/playbook/pb_card/docs/_card_tag.jsx
612
617
  - app/pb_kits/playbook/pb_card/docs/example.yml
613
618
  - app/pb_kits/playbook/pb_card/docs/index.js
614
619
  - app/pb_kits/playbook/pb_checkbox/_checkbox.jsx
615
620
  - app/pb_kits/playbook/pb_checkbox/_checkbox.scss
616
621
  - app/pb_kits/playbook/pb_checkbox/checkbox.html.erb
617
622
  - app/pb_kits/playbook/pb_checkbox/checkbox.rb
623
+ - app/pb_kits/playbook/pb_checkbox/checkbox.test.js
618
624
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_checked.html.erb
619
625
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_checked.jsx
620
626
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.html.erb
@@ -623,6 +629,8 @@ files:
623
629
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_default.jsx
624
630
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_error.html.erb
625
631
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_error.jsx
632
+ - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb
633
+ - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.jsx
626
634
  - app/pb_kits/playbook/pb_checkbox/docs/_checkbox_options.html.erb
627
635
  - app/pb_kits/playbook/pb_checkbox/docs/_description.md
628
636
  - app/pb_kits/playbook/pb_checkbox/docs/example.yml
@@ -654,6 +662,7 @@ files:
654
662
  - app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.scss
655
663
  - app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb
656
664
  - app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb
665
+ - app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.test.js
657
666
  - app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_click.jsx
658
667
  - app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_default.html.erb
659
668
  - app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_default.jsx
@@ -850,6 +859,29 @@ files:
850
859
  - app/pb_kits/playbook/pb_date_year_stacked/docs/_footer.md
851
860
  - app/pb_kits/playbook/pb_date_year_stacked/docs/example.yml
852
861
  - app/pb_kits/playbook/pb_date_year_stacked/docs/index.js
862
+ - app/pb_kits/playbook/pb_dialog/_close_icon.jsx
863
+ - app/pb_kits/playbook/pb_dialog/_dialog.html.erb
864
+ - app/pb_kits/playbook/pb_dialog/_dialog.jsx
865
+ - app/pb_kits/playbook/pb_dialog/_dialog.scss
866
+ - app/pb_kits/playbook/pb_dialog/_dialog_context.jsx
867
+ - app/pb_kits/playbook/pb_dialog/child_kits/_dialog_body.jsx
868
+ - app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.jsx
869
+ - app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.jsx
870
+ - app/pb_kits/playbook/pb_dialog/dialog.rb
871
+ - app/pb_kits/playbook/pb_dialog/dialog.test.jsx
872
+ - app/pb_kits/playbook/pb_dialog/dialog_header.rb
873
+ - app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.jsx
874
+ - app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.md
875
+ - app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx
876
+ - app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.jsx
877
+ - app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.md
878
+ - app/pb_kits/playbook/pb_dialog/docs/_dialog_separators.jsx
879
+ - app/pb_kits/playbook/pb_dialog/docs/_dialog_separators.md
880
+ - app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx
881
+ - app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.md
882
+ - app/pb_kits/playbook/pb_dialog/docs/_dialog_sizes.jsx
883
+ - app/pb_kits/playbook/pb_dialog/docs/example.yml
884
+ - app/pb_kits/playbook/pb_dialog/docs/index.js
853
885
  - app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.jsx
854
886
  - app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.scss
855
887
  - app/pb_kits/playbook/pb_distribution_bar/distribution_bar.html.erb
@@ -973,7 +1005,6 @@ files:
973
1005
  - app/pb_kits/playbook/pb_form/docs/example.yml
974
1006
  - app/pb_kits/playbook/pb_form/form.rb
975
1007
  - app/pb_kits/playbook/pb_form/form_builder.rb
976
- - app/pb_kits/playbook/pb_form/form_builder/action_area.html.erb
977
1008
  - app/pb_kits/playbook/pb_form/form_builder/action_area.rb
978
1009
  - app/pb_kits/playbook/pb_form/form_builder/checkbox_field.rb
979
1010
  - app/pb_kits/playbook/pb_form/form_builder/collection_select_field.rb
@@ -1156,6 +1187,14 @@ files:
1156
1187
  - app/pb_kits/playbook/pb_image/image.html.erb
1157
1188
  - app/pb_kits/playbook/pb_image/image.rb
1158
1189
  - app/pb_kits/playbook/pb_image/image.test.js
1190
+ - app/pb_kits/playbook/pb_inline/_inline.jsx
1191
+ - app/pb_kits/playbook/pb_inline/_inline.scss
1192
+ - app/pb_kits/playbook/pb_inline/docs/_inline_default.jsx
1193
+ - app/pb_kits/playbook/pb_inline/docs/_inline_input_options.jsx
1194
+ - app/pb_kits/playbook/pb_inline/docs/_inline_text_options.jsx
1195
+ - app/pb_kits/playbook/pb_inline/docs/example.yml
1196
+ - app/pb_kits/playbook/pb_inline/docs/index.js
1197
+ - app/pb_kits/playbook/pb_inline/inline.test.jsx
1159
1198
  - app/pb_kits/playbook/pb_kit/dateTime.js
1160
1199
  - app/pb_kits/playbook/pb_kit/pb_date_time.rb
1161
1200
  - app/pb_kits/playbook/pb_label_pill/_label_pill.jsx
@@ -1930,6 +1969,7 @@ files:
1930
1969
  - app/pb_kits/playbook/pb_typeahead/components/ClearIndicator.jsx
1931
1970
  - app/pb_kits/playbook/pb_typeahead/components/Control.jsx
1932
1971
  - app/pb_kits/playbook/pb_typeahead/components/IndicatorsContainer.jsx
1972
+ - app/pb_kits/playbook/pb_typeahead/components/Input.jsx
1933
1973
  - app/pb_kits/playbook/pb_typeahead/components/MenuList.jsx
1934
1974
  - app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx
1935
1975
  - app/pb_kits/playbook/pb_typeahead/components/Option.jsx
@@ -2072,7 +2112,7 @@ homepage: http://playbook.powerapp.cloud
2072
2112
  licenses:
2073
2113
  - MIT
2074
2114
  metadata: {}
2075
- post_install_message:
2115
+ post_install_message:
2076
2116
  rdoc_options: []
2077
2117
  require_paths:
2078
2118
  - lib
@@ -2087,8 +2127,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2087
2127
  - !ruby/object:Gem::Version
2088
2128
  version: 1.3.1
2089
2129
  requirements: []
2090
- rubygems_version: 3.0.3
2091
- signing_key:
2130
+ rubygems_version: 3.1.4
2131
+ signing_key:
2092
2132
  specification_version: 4
2093
2133
  summary: Playbook Design System
2094
2134
  test_files: []