playbook_ui_docs 13.25.0.pre.alpha.PBNTR272Dropdownkitv42769 β†’ 13.25.0.pre.alpha.PLAY1249fixTooltipswrappingformelementscausingmisalignment2783

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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui_docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.25.0.pre.alpha.PBNTR272Dropdownkitv42769
4
+ version: 13.25.0.pre.alpha.PLAY1249fixTooltipswrappingformelementscausingmisalignment2783
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: 2024-04-29 00:00:00.000000000 Z
12
+ date: 2024-04-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: playbook_ui
@@ -609,10 +609,6 @@ files:
609
609
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.md
610
610
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx
611
611
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.md
612
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_external_control.jsx
613
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_hook.jsx
614
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.jsx
615
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.md
616
612
  - app/pb_kits/playbook/pb_dropdown/docs/example.yml
617
613
  - app/pb_kits/playbook/pb_dropdown/docs/index.js
618
614
  - app/pb_kits/playbook/pb_file_upload/docs/_description.md
@@ -1,62 +0,0 @@
1
- import React, { useState } from 'react'
2
- import { Dropdown, useDropdown, Button } from '../../'
3
-
4
- const DropdownWithExternalControl = (props) => {
5
- // eslint-disable-next-line no-unused-vars
6
- const [selectedOption, setSelectedOption] = useState();
7
- const [isDropDownClosed, setIsDropdownClosed] = useDropdown(true);
8
-
9
- const options = [
10
- {
11
- label: "United States",
12
- value: "United States",
13
- areaCode: "+1",
14
- icon: "πŸ‡ΊπŸ‡Έ",
15
- id: "United-states"
16
- },
17
- {
18
- label: "Canada",
19
- value: "Canada",
20
- areaCode: "+1",
21
- icon: "πŸ‡¨πŸ‡¦",
22
- id: "canada"
23
- },
24
- {
25
- label: "Pakistan",
26
- value: "Pakistan",
27
- areaCode: "+92",
28
- icon: "πŸ‡΅πŸ‡°",
29
- id: "pakistan"
30
- }
31
- ];
32
-
33
- return (
34
- <div>
35
- <Button
36
- data={{dropdown:'pb-dropdown-trigger'}}
37
- marginBottom='sm'
38
- onClick={() => setIsDropdownClosed(!isDropDownClosed)}
39
- padding="none"
40
- tabIndex={0}
41
- variant="link"
42
- >
43
- {isDropDownClosed ? "Open Dropdown" : "Close Dropdown"}
44
- </Button>
45
-
46
- <Dropdown
47
- isClosed={isDropDownClosed}
48
- onSelect={(selectedItem) => setSelectedOption(selectedItem)}
49
- options={options}
50
- {...props}
51
- >
52
- {options.map((option) => (
53
- <Dropdown.Option key={option.id}
54
- option={option}
55
- />
56
- ))}
57
- </Dropdown>
58
- </div>
59
- )
60
- }
61
-
62
- export default DropdownWithExternalControl
@@ -1,75 +0,0 @@
1
- import React, { useState, useRef } from 'react'
2
- import { Dropdown, useDropdown, CircleIconButton, Icon, Body, FlexItem, Flex } from '../..'
3
-
4
- const DropdownWithHook = (props) => {
5
- // eslint-disable-next-line no-unused-vars
6
- const [selectedOption, setSelectedOption] = useState();
7
- const [isDropDownClosed, setIsDropdownClosed] = useDropdown(true);
8
- const buttonRef = useRef(null);
9
-
10
- const options = [
11
- {
12
- label: "United States",
13
- value: "United States",
14
- areaCode: "+1",
15
- icon: "πŸ‡ΊπŸ‡Έ",
16
- id: "United-states"
17
- },
18
- {
19
- label: "Canada",
20
- value: "Canada",
21
- areaCode: "+1",
22
- icon: "πŸ‡¨πŸ‡¦",
23
- id: "canada"
24
- },
25
- {
26
- label: "Pakistan",
27
- value: "Pakistan",
28
- areaCode: "+92",
29
- icon: "πŸ‡΅πŸ‡°",
30
- id: "pakistan"
31
- }
32
- ];
33
-
34
- return (
35
- <div>
36
- <CircleIconButton
37
- htmlOptions={{ref: buttonRef}}
38
- icon={"flag"}
39
- onClick={() => setIsDropdownClosed(!isDropDownClosed)}
40
- variant="secondary"
41
- />
42
- <Dropdown
43
- isClosed={isDropDownClosed}
44
- onSelect={(selectedItem) => setSelectedOption(selectedItem)}
45
- options={options}
46
- triggerRef={buttonRef}
47
- {...props}
48
- >
49
- {options.map((option) => (
50
- <Dropdown.Option key={option.id}
51
- option={option}
52
- >
53
- <>
54
- <FlexItem>
55
- <Flex paddingRight='md'>
56
- <Icon icon={option.icon}
57
- paddingRight="xs"
58
- />
59
- <Body text={option.label} />
60
- </Flex>
61
- </FlexItem>
62
- <FlexItem>
63
- <Body color="light"
64
- text={option.areaCode}
65
- />
66
- </FlexItem>
67
- </>
68
- </Dropdown.Option>
69
- ))}
70
- </Dropdown>
71
- </div>
72
- )
73
- }
74
-
75
- export default DropdownWithHook
@@ -1,39 +0,0 @@
1
- import React from 'react'
2
- import { Dropdown } from '../..'
3
-
4
- const DropdownDefault = (props) => {
5
-
6
- const options = [
7
- {
8
- label: "United States",
9
- value: "United States",
10
- },
11
- {
12
- label: "Canada",
13
- value: "Canada",
14
- },
15
- {
16
- label: "Pakistan",
17
- value: "Pakistan",
18
- }
19
- ];
20
-
21
-
22
- return (
23
- <div>
24
- <Dropdown
25
- label="Select a Country"
26
- options={options}
27
- {...props}
28
- >
29
- {options.map((option) => (
30
- <Dropdown.Option key={option.id}
31
- option={option}
32
- />
33
- ))}
34
- </Dropdown>
35
- </div>
36
- )
37
- }
38
-
39
- export default DropdownDefault
@@ -1 +0,0 @@
1
- The optional `label` prop takes a string value that if present will render that string as the label for the Dropdown.