playbook_ui_docs 13.26.0.pre.alpha.jasoncypretpatch12820 → 13.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.md +0 -5
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_description.md +1 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -2
  5. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_default.jsx +0 -20
  6. data/app/pb_kits/playbook/pb_avatar/docs/example.yml +0 -4
  7. data/app/pb_kits/playbook/pb_avatar/docs/index.js +0 -2
  8. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.md +3 -3
  9. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +1 -1
  10. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx +1 -1
  11. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +1 -1
  12. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +2 -9
  13. data/app/pb_kits/playbook/pb_loading_inline/docs/{_loading_inline_default.html.erb → _loading_inline_light.html.erb} +2 -2
  14. data/app/pb_kits/playbook/pb_loading_inline/docs/{_loading_inline_default.jsx → _loading_inline_light.jsx} +2 -2
  15. data/app/pb_kits/playbook/pb_loading_inline/docs/example.yml +2 -4
  16. data/app/pb_kits/playbook/pb_loading_inline/docs/index.js +1 -2
  17. data/dist/menu.yml +1 -1
  18. data/dist/playbook-doc.js +9 -9
  19. metadata +8 -23
  20. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.html.erb +0 -33
  21. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md +0 -24
  22. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.html.erb +0 -71
  23. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +0 -77
  24. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.html.erb +0 -71
  25. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +0 -77
  26. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.html.erb +0 -10
  27. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.html.erb +0 -17
  28. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.html.erb +0 -60
  29. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.html.erb +0 -45
  30. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.html.erb +0 -17
  31. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.html.erb +0 -47
  32. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.html.erb +0 -10
  33. data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_custom.html.erb +0 -13
  34. data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_custom.jsx +0 -26
  35. data/dist/app/components/playbook/pb_docs/advanced_table_mock_data.json +0 -278
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui_docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.26.0.pre.alpha.jasoncypretpatch12820
4
+ version: 13.26.0
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: 2024-05-03 00:00:00.000000000 Z
12
+ date: 2024-05-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: playbook_ui
@@ -33,8 +33,6 @@ executables: []
33
33
  extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.html.erb
37
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md
38
36
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.jsx
39
37
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.md
40
38
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.jsx
@@ -55,14 +53,11 @@ files:
55
53
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.md
56
54
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx
57
55
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.md
56
+ - app/pb_kits/playbook/pb_advanced_table/docs/_description.md
58
57
  - app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading.js
59
58
  - app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data.json
60
59
  - app/pb_kits/playbook/pb_advanced_table/docs/example.yml
61
60
  - app/pb_kits/playbook/pb_advanced_table/docs/index.js
62
- - app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.html.erb
63
- - app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx
64
- - app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.html.erb
65
- - app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx
66
61
  - app/pb_kits/playbook/pb_avatar/docs/_avatar_default.html.erb
67
62
  - app/pb_kits/playbook/pb_avatar/docs/_avatar_default.jsx
68
63
  - app/pb_kits/playbook/pb_avatar/docs/_avatar_default_swift.md
@@ -602,31 +597,24 @@ files:
602
597
  - app/pb_kits/playbook/pb_distribution_bar/docs/_distribution_bar_default.jsx
603
598
  - app/pb_kits/playbook/pb_distribution_bar/docs/example.yml
604
599
  - app/pb_kits/playbook/pb_distribution_bar/docs/index.js
605
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.html.erb
606
600
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
607
601
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md
608
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.html.erb
609
602
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.jsx
610
603
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.md
611
604
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx
612
605
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.md
613
606
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx
614
607
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.md
615
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.html.erb
616
608
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx
617
609
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md
618
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.html.erb
619
610
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.jsx
620
611
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.md
621
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.html.erb
622
612
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.jsx
623
613
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.md
624
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.html.erb
625
614
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx
626
615
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.md
627
616
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_external_control.jsx
628
617
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_hook.jsx
629
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.html.erb
630
618
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.jsx
631
619
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.md
632
620
  - app/pb_kits/playbook/pb_dropdown/docs/example.yml
@@ -1010,10 +998,8 @@ files:
1010
998
  - app/pb_kits/playbook/pb_list/docs/example.yml
1011
999
  - app/pb_kits/playbook/pb_list/docs/index.js
1012
1000
  - app/pb_kits/playbook/pb_loading_inline/docs/_description.md
1013
- - app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_custom.html.erb
1014
- - app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_custom.jsx
1015
- - app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_default.html.erb
1016
- - app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_default.jsx
1001
+ - app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_light.html.erb
1002
+ - app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_light.jsx
1017
1003
  - app/pb_kits/playbook/pb_loading_inline/docs/example.yml
1018
1004
  - app/pb_kits/playbook/pb_loading_inline/docs/index.js
1019
1005
  - app/pb_kits/playbook/pb_map/docs/_map_default.jsx
@@ -1837,7 +1823,6 @@ files:
1837
1823
  - app/pb_kits/playbook/pb_weekday_stacked/docs/_weekday_stacked_variant.jsx
1838
1824
  - app/pb_kits/playbook/pb_weekday_stacked/docs/example.yml
1839
1825
  - app/pb_kits/playbook/pb_weekday_stacked/docs/index.js
1840
- - dist/app/components/playbook/pb_docs/advanced_table_mock_data.json
1841
1826
  - dist/app/components/playbook/pb_docs/kit_api.html.erb
1842
1827
  - dist/app/components/playbook/pb_docs/kit_api.rb
1843
1828
  - dist/app/components/playbook/pb_docs/kit_example.html.erb
@@ -1849,7 +1834,7 @@ homepage: https://playbook.powerapp.cloud/
1849
1834
  licenses:
1850
1835
  - ISC
1851
1836
  metadata: {}
1852
- post_install_message:
1837
+ post_install_message:
1853
1838
  rdoc_options: []
1854
1839
  require_paths:
1855
1840
  - lib
@@ -1865,7 +1850,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1865
1850
  version: '0'
1866
1851
  requirements: []
1867
1852
  rubygems_version: 3.5.3
1868
- signing_key:
1853
+ signing_key:
1869
1854
  specification_version: 4
1870
1855
  summary: Playbook Design System Docs
1871
1856
  test_files: []
@@ -1,33 +0,0 @@
1
- <% column_definitions = [
2
- {
3
- accessor: "year",
4
- label: "Year",
5
- cellAccessors: ["quarter", "month", "day"],
6
- },
7
- {
8
- accessor: "newEnrollments",
9
- label: "New Enrollments",
10
- },
11
- {
12
- accessor: "scheduledMeetings",
13
- label: "Scheduled Meetings",
14
- },
15
- {
16
- accessor: "attendanceRate",
17
- label: "Attendance Rate",
18
- },
19
- {
20
- accessor: "completedClasses",
21
- label: "Completed Classes",
22
- },
23
- {
24
- accessor: "classCompletionRate",
25
- label: "Class Completion Rate",
26
- },
27
- {
28
- accessor: "graduatedStudents",
29
- label: "Graduated Students",
30
- }
31
- ] %>
32
-
33
- <%= pb_rails("advanced_table", props: {table_data: @table_data, column_definitions: column_definitions}) %>
@@ -1,24 +0,0 @@
1
- **BETA VERSION**
2
- This kit's Rails version is currently under development. Some features may not work as expected, and breaking changes may still occur; use with caution.
3
- <br />
4
- <br />
5
- <br />
6
-
7
- The AdvancedTable kit accepts tree data and automatically renders expansion controls for nested subrows, to any depth, based on the data it is given. In it's simplest form, __the kit has two required props__:
8
-
9
- ### table_data
10
-
11
- `table_data` accepts an array of objects as the table data. Each object is a table row, and each key:value pair within an object is a column value within that row. Nested children within a data object are automatically rendered as subrows under their parent row.
12
-
13
- For a visual of the data structure needed for `table_data`, see [here](https://github.com/powerhome/playbook/tree/master/playbook/app/pb_kits/playbook/pb_advanced_table#readme).
14
-
15
- ### column_definitions
16
-
17
- Column definitions are the single most important part of building a table as they are responsible for building the underlying data model that is used for all sorting, expansion, etc. `column_definitions` in the AdvancedTable kit is an array of objects as seen in the code snippet below. Each object within the array has two REQUIRED items:
18
-
19
- - `accessor`: this is the key from your data for the value you want rendered in that column
20
- - `label`: this is what will be rendered as the column header label
21
-
22
- There is also one optional item that is only required if the table has nested data:
23
-
24
- - `cellAccessors`: This is an array of strings that represent keys from your data object. This is only required for the first column in case of nested data. If you have nested data, the AdvancedTable needs to know what to render in that first column for nested items. This array represents the nested data in the order you want it rendered.
@@ -1,71 +0,0 @@
1
- <%= pb_rails("avatar", props: {
2
- component_overlay: {
3
- component: "badge",
4
- text: "12",
5
- placement: "top-left"
6
- },
7
- name: "Terry Johnson",
8
- size: "xxs",
9
- image_url: "https://randomuser.me/api/portraits/men/44.jpg",
10
- margin_bottom: "sm"
11
- }) %>
12
-
13
- <%= pb_rails("avatar", props: {
14
- component_overlay: {
15
- component: "badge",
16
- text: "12",
17
- placement: "top-right"
18
- },
19
- name: "Terry Johnson",
20
- size: "xs",
21
- image_url: "https://randomuser.me/api/portraits/men/44.jpg",
22
- margin_bottom: "sm"
23
- }) %>
24
-
25
- <%= pb_rails("avatar", props: {
26
- component_overlay: {
27
- component: "badge",
28
- text: "12",
29
- placement: "bottom-right"
30
- },
31
- name: "Terry Johnson",
32
- size: "sm",
33
- image_url: "https://randomuser.me/api/portraits/men/44.jpg",
34
- margin_bottom: "sm"
35
- }) %>
36
-
37
- <%= pb_rails("avatar", props: {
38
- component_overlay: {
39
- component: "badge",
40
- text: "12",
41
- placement: "bottom-left"
42
- },
43
- name: "Terry Johnson",
44
- size: "md",
45
- image_url: "https://randomuser.me/api/portraits/men/44.jpg",
46
- margin_bottom: "sm"
47
- }) %>
48
-
49
- <%= pb_rails("avatar", props: {
50
- component_overlay: {
51
- component: "badge",
52
- text: "12",
53
- placement: "top-left"
54
- },
55
- name: "Terry Johnson",
56
- size: "lg",
57
- image_url: "https://randomuser.me/api/portraits/men/44.jpg",
58
- margin_bottom: "sm"
59
- }) %>
60
-
61
- <%= pb_rails("avatar", props: {
62
- component_overlay: {
63
- component: "badge",
64
- text: "12",
65
- placement: "top-right"
66
- },
67
- name: "Terry Johnson",
68
- size: "xl",
69
- image_url: "https://randomuser.me/api/portraits/men/44.jpg",
70
- margin_bottom: "sm"
71
- }) %>
@@ -1,77 +0,0 @@
1
- import React from "react";
2
- import { Avatar } from '../..'
3
-
4
- const AvatarBadgeComponentOverlay = () => {
5
- return (
6
- <div>
7
- <Avatar
8
- componentOverlay={{
9
- component: "badge",
10
- placement: "top-left",
11
- text: "12"
12
- }}
13
- imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
14
- marginBottom="sm"
15
- size="xxs"
16
- />
17
-
18
- <Avatar
19
- componentOverlay={{
20
- component: "badge",
21
- placement: "top-right",
22
- text: "12"
23
- }}
24
- imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
25
- marginBottom="sm"
26
- size="xs"
27
- />
28
-
29
- <Avatar
30
- componentOverlay={{
31
- component: "badge",
32
- placement: "bottom-right",
33
- text: "12"
34
- }}
35
- imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
36
- marginBottom="sm"
37
- size="sm"
38
- />
39
-
40
- <Avatar
41
- componentOverlay={{
42
- component: "badge",
43
- placement: "bottom-left",
44
- text: "12"
45
- }}
46
- imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
47
- marginBottom="sm"
48
- size="md"
49
- />
50
-
51
- <Avatar
52
- componentOverlay={{
53
- component: "badge",
54
- placement: "top-left",
55
- text: "12"
56
- }}
57
- imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
58
- marginBottom="sm"
59
- size="lg"
60
- />
61
-
62
- <Avatar
63
- componentOverlay={{
64
- component: "badge",
65
- placement: "top-right",
66
- text: "12"
67
- }}
68
- imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
69
- marginBottom="sm"
70
- size="xl"
71
- />
72
-
73
- </div>
74
- )
75
- }
76
-
77
- export default AvatarBadgeComponentOverlay
@@ -1,71 +0,0 @@
1
- <%= pb_rails("avatar", props: {
2
- component_overlay: {
3
- component: "icon_circle",
4
- icon: "plus",
5
- placement: "top-left"
6
- },
7
- name: "Terry Johnson",
8
- size: "xxs",
9
- image_url: "https://randomuser.me/api/portraits/men/44.jpg",
10
- margin_bottom: "sm"
11
- }) %>
12
-
13
- <%= pb_rails("avatar", props: {
14
- component_overlay: {
15
- component: "icon_circle",
16
- icon: "plus",
17
- placement: "top-right"
18
- },
19
- name: "Terry Johnson",
20
- size: "xs",
21
- image_url: "https://randomuser.me/api/portraits/men/44.jpg",
22
- margin_bottom: "sm"
23
- }) %>
24
-
25
- <%= pb_rails("avatar", props: {
26
- component_overlay: {
27
- component: "icon_circle",
28
- icon: "plus",
29
- placement: "bottom-right"
30
- },
31
- name: "Terry Johnson",
32
- size: "sm",
33
- image_url: "https://randomuser.me/api/portraits/men/44.jpg",
34
- margin_bottom: "sm"
35
- }) %>
36
-
37
- <%= pb_rails("avatar", props: {
38
- component_overlay: {
39
- component: "icon_circle",
40
- icon: "plus",
41
- placement: "bottom-left"
42
- },
43
- name: "Terry Johnson",
44
- size: "md",
45
- image_url: "https://randomuser.me/api/portraits/men/44.jpg",
46
- margin_bottom: "sm"
47
- }) %>
48
-
49
- <%= pb_rails("avatar", props: {
50
- component_overlay: {
51
- component: "icon_circle",
52
- icon: "plus",
53
- placement: "top-left"
54
- },
55
- name: "Terry Johnson",
56
- size: "lg",
57
- image_url: "https://randomuser.me/api/portraits/men/44.jpg",
58
- margin_bottom: "sm"
59
- }) %>
60
-
61
- <%= pb_rails("avatar", props: {
62
- component_overlay: {
63
- component: "icon_circle",
64
- icon: "plus",
65
- placement: "top-right"
66
- },
67
- name: "Terry Johnson",
68
- size: "xl",
69
- image_url: "https://randomuser.me/api/portraits/men/44.jpg",
70
- margin_bottom: "sm"
71
- }) %>
@@ -1,77 +0,0 @@
1
- import React from "react";
2
- import { Avatar } from '../..'
3
-
4
- const AvatarCircleIconComponentOverlay = () => {
5
- return (
6
- <div>
7
- <Avatar
8
- componentOverlay={{
9
- component: "iconCircle",
10
- icon: "plus",
11
- placement: "top-left"
12
- }}
13
- imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
14
- marginBottom="sm"
15
- size="xxs"
16
- />
17
-
18
- <Avatar
19
- componentOverlay={{
20
- component: "iconCircle",
21
- icon: "plus",
22
- placement: "top-right"
23
- }}
24
- imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
25
- marginBottom="sm"
26
- size="xs"
27
- />
28
-
29
- <Avatar
30
- componentOverlay={{
31
- component: "iconCircle",
32
- icon: "plus",
33
- placement: "bottom-right",
34
- }}
35
- imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
36
- marginBottom="sm"
37
- size="sm"
38
- />
39
-
40
- <Avatar
41
- componentOverlay={{
42
- component: "iconCircle",
43
- icon: "plus",
44
- placement: "bottom-left"
45
- }}
46
- imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
47
- marginBottom="sm"
48
- size="md"
49
- />
50
-
51
- <Avatar
52
- componentOverlay={{
53
- component: "iconCircle",
54
- icon: "plus",
55
- placement: "top-left"
56
- }}
57
- imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
58
- marginBottom="sm"
59
- size="lg"
60
- />
61
-
62
- <Avatar
63
- componentOverlay={{
64
- component: "iconCircle",
65
- icon: "plus",
66
- placement: "top-right"
67
- }}
68
- imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
69
- marginBottom="sm"
70
- size="xl"
71
- />
72
-
73
- </div>
74
- )
75
- }
76
-
77
- export default AvatarCircleIconComponentOverlay
@@ -1,10 +0,0 @@
1
- <%
2
- options = [
3
- { label: 'United States', value: 'United States' },
4
- { label: 'Canada', value: 'Canada' },
5
- { label: 'Pakistan', value: 'Pakistan' },
6
- ]
7
-
8
- %>
9
-
10
- <%= pb_rails("dropdown", props: {options: options}) %>
@@ -1,17 +0,0 @@
1
- <%
2
- options = [
3
- { label: 'United States', value: 'United States' },
4
- { label: 'Canada', value: 'Canada' },
5
- { label: 'Pakistan', value: 'Pakistan' },
6
- ]
7
-
8
- %>
9
-
10
- <%= pb_rails("dropdown", props: {options: options}) do %>
11
- <%= pb_rails("dropdown/dropdown_trigger") %>
12
- <%= pb_rails("dropdown/dropdown_container") do %>
13
- <% options.each do |option| %>
14
- <%= pb_rails("dropdown/dropdown_option", props: {option: option}) %>
15
- <% end %>
16
- <% end %>
17
- <% end %>
@@ -1,60 +0,0 @@
1
- <%
2
- options = [
3
- {
4
- label: "Jasper Furniss",
5
- value: "Jasper Furniss",
6
- territory: "PHL",
7
- title: "Senior UX Engineer",
8
- id: "jasper-furniss",
9
- status: "Offline"
10
- },
11
- {
12
- label: "Ramon Ruiz",
13
- value: "Ramon Ruiz",
14
- territory: "PHL",
15
- title: "Senior UX Designer",
16
- id: "ramon-ruiz",
17
- status: "Away"
18
- },
19
- {
20
- label: "Jason Cypret",
21
- value: "Jason Cypret",
22
- territory: "PHL",
23
- title: "VP of User Experience",
24
- id: "jason-cypret",
25
- status: "Online"
26
- },
27
- {
28
- label: "Courtney Long",
29
- value: "Courtney Long",
30
- territory: "PHL",
31
- title: "UX Design Mentor",
32
- id: "courtney-long",
33
- status: "Online"
34
- }
35
- ]
36
-
37
- %>
38
-
39
- <%
40
- custom_display = capture do
41
- pb_rails("avatar", props: { name: "Courtney Long", size: "xs" })
42
- end
43
- %>
44
-
45
-
46
- <%= pb_rails("dropdown", props: {options: options}) do %>
47
- <%= pb_rails("dropdown/dropdown_trigger", props: {placeholder: "Select a User", custom_display: custom_display}) %>
48
- <%= pb_rails("dropdown/dropdown_container") do %>
49
- <% options.each do |option| %>
50
- <%= pb_rails("dropdown/dropdown_option", props: {option: option}) do %>
51
- <%= pb_rails("flex/flex_item") do %>
52
- <%= pb_rails("user", props: {name: option[:label], align:"left", avatar: true, orientation:"horizontal", territory:option[:territory], title: option[:title]}) %>
53
- <% end %>
54
- <%= pb_rails("flex/flex_item") do %>
55
- <%= pb_rails("badge", props: {rounded: true, dark: true, text: option[:status], variant: option[:status] == "Offline" ? "neutral" : option[:status] == "Online" ? "success" : "warning" }) %>
56
- <% end %>
57
- <% end %>
58
- <% end %>
59
- <% end %>
60
- <% end %>
@@ -1,45 +0,0 @@
1
- <%
2
- options = [
3
- {
4
- label: "United States",
5
- value: "United States",
6
- areaCode: "+1",
7
- icon: "🇺🇸",
8
- id: "United-states"
9
- },
10
- {
11
- label: "Canada",
12
- value: "Canada",
13
- areaCode: "+1",
14
- icon: "🇨🇦",
15
- id: "canada"
16
- },
17
- {
18
- label: "Pakistan",
19
- value: "Pakistan",
20
- areaCode: "+92",
21
- icon: "🇵🇰",
22
- id: "pakistan"
23
- }
24
- ]
25
-
26
- %>
27
-
28
- <%= pb_rails("dropdown", props: {options: options}) do %>
29
- <%= pb_rails("dropdown/dropdown_trigger") %>
30
- <%= pb_rails("dropdown/dropdown_container") do %>
31
- <% options.each do |option| %>
32
- <%= pb_rails("dropdown/dropdown_option", props: {option: option}) do %>
33
- <%= pb_rails("flex/flex_item") do %>
34
- <%= pb_rails("flex") do %>
35
- <%= pb_rails("icon", props: {icon: option[:icon]}) %>
36
- <%= pb_rails("body", props: {text: option[:label], padding_left:"xs"}) %>
37
- <% end %>
38
- <% end %>
39
- <%= pb_rails("flex/flex_item") do %>
40
- <%= pb_rails("body", props: {color:"light", text: option[:areaCode]}) %>
41
- <% end %>
42
- <% end %>
43
- <% end %>
44
- <% end %>
45
- <% end %>
@@ -1,17 +0,0 @@
1
- <%
2
- options = [
3
- { label: 'United States', value: 'United States' },
4
- { label: 'Canada', value: 'Canada' },
5
- { label: 'Pakistan', value: 'Pakistan' },
6
- ]
7
-
8
- %>
9
-
10
- <%= pb_rails("dropdown", props: {options: options}) do %>
11
- <%= pb_rails("dropdown/dropdown_trigger") %>
12
- <%= pb_rails("dropdown/dropdown_container") do %>
13
- <% options.each do |option| %>
14
- <%= pb_rails("dropdown/dropdown_option", props: {option: option, padding:"sm"}) %>
15
- <% end %>
16
- <% end %>
17
- <% end %>
@@ -1,47 +0,0 @@
1
- <%
2
- options = [
3
- {
4
- label: "United States",
5
- value: "United States",
6
- areaCode: "+1",
7
- icon: "🇺🇸",
8
- id: "United-states"
9
- },
10
- {
11
- label: "Canada",
12
- value: "Canada",
13
- areaCode: "+1",
14
- icon: "🇨🇦",
15
- id: "canada"
16
- },
17
- {
18
- label: "Pakistan",
19
- value: "Pakistan",
20
- areaCode: "+92",
21
- icon: "🇵🇰",
22
- id: "pakistan"
23
- }
24
- ]
25
-
26
- %>
27
-
28
- <%= pb_rails("dropdown", props: {options: options}) do %>
29
- <%= pb_rails("dropdown/dropdown_trigger") do %>
30
- <%= pb_rails("icon_circle", props: {icon:"flag", cursor: "pointer", variant:"royal"}) %>
31
- <% end %>
32
- <%= pb_rails("dropdown/dropdown_container", props:{max_width:"xs"}) do %>
33
- <% options.each do |option| %>
34
- <%= pb_rails("dropdown/dropdown_option", props: {option: option}) do %>
35
- <%= pb_rails("flex/flex_item") do %>
36
- <%= pb_rails("flex") do %>
37
- <%= pb_rails("icon", props: {icon: option[:icon]}) %>
38
- <%= pb_rails("body", props: {text: option[:label], padding_left:"xs"}) %>
39
- <% end %>
40
- <% end %>
41
- <%= pb_rails("flex/flex_item") do %>
42
- <%= pb_rails("body", props: {color:"light", text: option[:areaCode]}) %>
43
- <% end %>
44
- <% end %>
45
- <% end %>
46
- <% end %>
47
- <% end %>