playbook_ui 12.25.0.pre.alpha.railsmultilevelimprovements785 → 12.25.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -1
  3. data/app/pb_kits/playbook/index.js +0 -1
  4. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_swift.md +1 -82
  5. data/app/pb_kits/playbook/pb_docs/kit_example.html.erb +13 -14
  6. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +2 -3
  7. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.scss +98 -58
  8. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +86 -356
  9. data/app/pb_kits/playbook/pb_multi_level_select/_multi_select_helper.tsx +31 -0
  10. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.md +1 -1
  11. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_return_all_selected.html.erb +1 -1
  12. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +0 -1
  13. data/app/pb_kits/playbook/pb_multi_level_select/helper_functions.ts +87 -0
  14. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.rb +0 -3
  15. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.test.jsx +1 -1
  16. data/app/pb_kits/playbook/playbook-doc.js +0 -2
  17. data/dist/menu.yml +0 -1
  18. data/dist/playbook-rails.js +7 -7
  19. data/lib/playbook/forms/builder.rb +0 -1
  20. data/lib/playbook/version.rb +2 -2
  21. metadata +9 -29
  22. data/app/pb_kits/playbook/pb_detail/_detail.scss +0 -44
  23. data/app/pb_kits/playbook/pb_detail/_detail.tsx +0 -55
  24. data/app/pb_kits/playbook/pb_detail/_detail_mixins.scss +0 -29
  25. data/app/pb_kits/playbook/pb_detail/detail.html.erb +0 -7
  26. data/app/pb_kits/playbook/pb_detail/detail.rb +0 -31
  27. data/app/pb_kits/playbook/pb_detail/detail.test.jsx +0 -46
  28. data/app/pb_kits/playbook/pb_detail/docs/_description.md +0 -1
  29. data/app/pb_kits/playbook/pb_detail/docs/_detail_bold.html.erb +0 -34
  30. data/app/pb_kits/playbook/pb_detail/docs/_detail_bold.jsx +0 -49
  31. data/app/pb_kits/playbook/pb_detail/docs/_detail_bold.md +0 -1
  32. data/app/pb_kits/playbook/pb_detail/docs/_detail_colors.html.erb +0 -24
  33. data/app/pb_kits/playbook/pb_detail/docs/_detail_colors.jsx +0 -38
  34. data/app/pb_kits/playbook/pb_detail/docs/_detail_colors.md +0 -6
  35. data/app/pb_kits/playbook/pb_detail/docs/_detail_default.html.erb +0 -3
  36. data/app/pb_kits/playbook/pb_detail/docs/_detail_default.jsx +0 -13
  37. data/app/pb_kits/playbook/pb_detail/docs/_detail_styled.html.erb +0 -22
  38. data/app/pb_kits/playbook/pb_detail/docs/_detail_styled.jsx +0 -32
  39. data/app/pb_kits/playbook/pb_detail/docs/example.yml +0 -11
  40. data/app/pb_kits/playbook/pb_detail/docs/index.js +0 -4
  41. data/app/pb_kits/playbook/pb_multi_level_select/_helper_functions.tsx +0 -212
  42. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_form.html.erb +0 -72
  43. data/lib/playbook/forms/builder/multi_level_select_field.rb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dbd58f8ab04fa69f87a55fd4848a36f53ffb67ff249bf9bd8d09b199fb7e51b8
4
- data.tar.gz: e3bc97d4d4035db97049bfe7d64424d0887061cba7772db8091a55c884be2ba1
3
+ metadata.gz: 2c0e138725ae04e9e300cea544d787219534b5da851b11840c536622e6a94c6c
4
+ data.tar.gz: '067282a70e9f2e6277f85bb62ca4eb398a6f3e001f6acfcd36e445bbd141b322'
5
5
  SHA512:
6
- metadata.gz: e8cf7aeadcc735afeb4697b378ee93d56c2220f26b37c808d106dd432bd5ae5220ba251a400fb551c32ae79b5f351a550e435c320d72367b512abf907eeb3512
7
- data.tar.gz: 2a4461c2be7dbcc118fb7bb786ba6970dca3f669bce9256fb4337db9e775ba1c4710340c284742fd3e8218424eaff772b7b99e4b7446ca33d1f45e87ede5539c
6
+ metadata.gz: d034799f6965ecd6d82823ac00d5392c5427ff175b322b0a33fbed74fbebfa558207a4c6372b8aca269c3d0e14a2acf4e0edc0cfcaddf8ebc66325be62614325
7
+ data.tar.gz: 0ebf023711e4150a1a610f5eee2ae3d9a5c3499c4f15222fe84a94a9e8aaf53c2501889b655840241c1f4a94111d72ed8216a821be22271049f9155b500466bf
@@ -5,7 +5,6 @@
5
5
  @import 'pb_button_toolbar/button_toolbar';
6
6
  @import 'pb_caption/caption';
7
7
  @import 'pb_card/card';
8
- @import 'pb_detail/detail';
9
8
  @import 'pb_title/title';
10
9
  @import 'pb_avatar/avatar';
11
10
  @import 'pb_avatar_action_button/avatar_action_button';
@@ -31,7 +31,6 @@ export { default as DateStacked } from './pb_date_stacked/_date_stacked'
31
31
  export { default as DateTime } from './pb_date_time/_date_time'
32
32
  export { default as DateTimeStacked } from './pb_date_time_stacked/_date_time_stacked'
33
33
  export { default as DateYearStacked } from './pb_date_year_stacked/_date_year_stacked'
34
- export { default as Detail} from './pb_detail/_detail'
35
34
  export { default as Dialog } from './pb_dialog/_dialog'
36
35
  export { default as DistributionBar } from './pb_distribution_bar/_distribution_bar'
37
36
  export { default as FileUpload } from './pb_file_upload/_file_upload'
@@ -1,82 +1 @@
1
- In the world of design, consistency is key. Whether you're designing a website, app, or product, having a consistent visual language can make all the difference. That's where design systems come in.
2
-
3
- A design system is a collection of reusable components, guidelines, and assets that help ensure consistency across all of your design work. It's a way to standardize your design language, making it easier for your team to work together and for your users to navigate your products.
4
-
5
- In this article, we'll explore the various elements of a design system and how they can be used to create a cohesive and effective design language.
6
-
7
- ### Headings
8
- Headings are an essential component of any design system. They help organize content, provide visual hierarchy, and make it easier for users to scan and find what they're looking for. A good design system will have headings of various sizes, ranging from H1 (the largest) to H6 (the smallest). Here's an example:
9
-
10
- # H1: Main Title Headings
11
- ## H2: Headings
12
- ### H3: Subheadings
13
- #### H4: Sub-Subheadings
14
-
15
- ![image for avatar](https://images.unsplash.com/photo-1684237276530-a562fa8338b1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=580&q=80)
16
-
17
- ### Lists
18
- Lists are another important component of a design system. They help organize content into easily digestible chunks, making it easier for users to read and understand. There are two types of lists: ordered and unordered.
19
-
20
- Ordered lists are numbered, and each item is listed in a specific order. For example:
21
-
22
- 1. Headings
23
- 2. Lists
24
- 3. Blockquotes
25
- 4. Links
26
- 5. Bold
27
- 6. Underline
28
- 7. Code Blocks
29
- 8. Inline Code
30
- 9. Example Tables
31
- 10. Horizontal Rules
32
-
33
- Unordered lists, on the other hand, use bullet points to separate each item. For example:
34
-
35
- * Headings
36
- * Lists
37
- * Blockquotes
38
- * Links
39
- * Bold
40
- * Underline
41
- * Code Blocks
42
- * Inline Code
43
- * Example Tables
44
- * Horizontal Rules
45
-
46
- ### Blockquotes
47
- Blockquotes are used to highlight a particular section of text or quote. They’re often used to emphasize an important point or to provide context. Here’s an example:
48
-
49
- > “Design systems are a collection of reusable components, guidelines, and assets that help ensure consistency across all of your design work.” - ChatGPT
50
-
51
-
52
- ### Links
53
- Links are an important part of any design system. They allow users to navigate between different pages and sections of your product. When using links in your design system, it’s important to make sure they’re consistent in color, size, and style. Here’s an example:
54
- Click here to learn more about design systems.
55
-
56
- ### Bold, Underline, & Italics
57
- **Bold** and _underline_ are used to *highlight specific words* or phrases within ~~a block of~~ text. They help draw the user’s attention to important information. Here’s an example: *Design systems are* a collection of **reusable components**, **guidelines**, and **assets** that help ensure _consistency across all of your design work_.
58
-
59
- ### Code Blocks and Inline Code
60
- Code blocks and `inline code` are used to display and highlight code within a block of text. This is especially useful for developers who need to reference code snippets in their work.
61
-
62
- Here’s an example:
63
-
64
- ```js
65
- function greet() {
66
- console.log(“Hello, world!”);
67
- }
68
- ```
69
-
70
- ### Example Tables
71
- Example tables are used to display data in a clear and organized way. They help users compare and analyze information quickly. Here’s an example:
72
-
73
- | Tables | Are | Cool |
74
- |----------|:-------------:|------:|
75
- | col 1 is | left-aligned | $1600 |
76
- | col 2 is | centered | $12 |
77
- | col 3 is | right-aligned | $1 |
78
-
79
- ---
80
-
81
- ### Horizontal Rules
82
- Horizontal rules are used to separate sections of content visually. They help break up long blocks of text and make it easier for users
1
+ ![image for avatar](https://images.unsplash.com/photo-1684237276530-a562fa8338b1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=580&q=80)
@@ -1,21 +1,20 @@
1
1
  <% example_html = ERB.new(example).result %>
2
2
 
3
3
  <%= pb_rails("card", props: { classname: "pb--doc", padding: "none", dark: dark }) do %>
4
- <% unless (action_name == "kit_show_swift") %>
5
- <div class="pb--kit-example">
6
- <%= pb_rails("caption", props: { text: example_title, dark: dark }) %>
7
- <br />
8
- <%= example %>
9
- <br>
10
- </div>
11
- <% else %>
12
- <div class="pb--kit-example-markdown pt_none markdown <%= dark ? "dark" : "" %>">
13
- <%= pb_rails("caption", props: { text: example_title, dark: dark, margin_top: "md" }) %>
4
+ <div class="pb--kit-example">
5
+ <%= pb_rails("caption", props: { text: example_title, dark: dark }) %>
6
+ <br />
7
+ <%= example %>
8
+ <br>
9
+ </div>
10
+
11
+ <% if (action_name == "kit_show_swift") %>
12
+ <div class="pb--kit-example-markdown pt_none <%= dark ? "dark" : "" %>">
14
13
  <%= render_markdown(description) %>
15
14
  </div>
16
15
  <% end %>
17
16
  <% if show_code %>
18
- <div class="markdown pb--kit-example-markdown markdown <%= dark ? "dark" : "" %>">
17
+ <div class="markdown pb--kit-example-markdown <%= dark ? "dark" : "" %>">
19
18
  <%= render_markdown(description) %>
20
19
  </div>
21
20
  <div id="code-wrapper">
@@ -33,10 +32,10 @@
33
32
  </div>
34
33
  <div class="pb--codeCopy" data-action="toggle" data-togglable="code_example" style="display: none" >
35
34
  <%= pb_rails("section_separator", props: { dark: dark })%>
36
- <a href="#" id="copy-code-<%= example_key %>" class="pb--copy-code" onclick="copyOnClick(`<%= source %>`, `copy-code-<%= example_key %>`)">
37
- <%= pb_rails("button", props: { id: "copy-button-#{example_key}", text: "Copy Code", size: "sm", icon: "copy", padding_x: "xs" }) %>
35
+ <a href="#" style="padding: 16px 0px 22px 0px;" id="copy-code-<%= example_key %>" class="pb--copy-code" onclick="copyOnClick(`<%= source %>`, `copy-code-<%= example_key %>`)">
36
+ <%= pb_rails("button", props: { id: "copy-button-#{example_key}", text: "Copy Code", size: "sm", icon: "copy" }) %>
38
37
  </a>
39
- <pre class="highlight"><%= raw render_code(source, highlighter) %></pre>
38
+ <pre class="highlight"><%= raw rouge(source, highlighter) %></pre>
40
39
  </div>
41
40
  <%= pb_rails("popover", props: {
42
41
  trigger_element_id: "copy-button-#{example_key}",
@@ -10,7 +10,7 @@ type FormPillProps = {
10
10
  className?: string,
11
11
  id?: string,
12
12
  text: string,
13
- name?: string,
13
+ name: string,
14
14
  onClick?: React.MouseEventHandler<HTMLSpanElement>,
15
15
  avatar?: boolean,
16
16
  avatarUrl?: string,
@@ -25,7 +25,6 @@ type FormPillProps = {
25
25
  const FormPill = (props: FormPillProps) => {
26
26
  const {
27
27
  className,
28
- id,
29
28
  text,
30
29
  name,
31
30
  onClick = () => {},
@@ -42,7 +41,7 @@ const FormPill = (props: FormPillProps) => {
42
41
  textTransform,
43
42
  )
44
43
  return (
45
- <div className={css} id={id}>
44
+ <div className={css}>
46
45
  {name &&
47
46
  <>
48
47
  <Avatar
@@ -5,83 +5,123 @@
5
5
  @import "../tokens/spacing";
6
6
  @import "../tokens/typography";
7
7
  @import "../tokens/line_height";
8
- @import "../tokens/positioning";
9
8
 
10
9
  .pb_multi_level_select {
11
10
  font-family: $font-family-base;
12
11
 
13
- .wrapper {
14
- position: relative;
12
+ .search {
13
+ font-family: $font-family-base;
14
+ }
15
15
 
16
- .toggle_icon {
17
- visibility: hidden;
18
- .pb_button_content {
19
- visibility: hidden !important;
20
- }
16
+ .dropdown {
17
+ width: 100%;
18
+ .search {
19
+ border-bottom: none;
21
20
  }
22
21
 
23
- .input_wrapper {
24
- background-color: $white;
25
- cursor: pointer;
26
- padding: $space_xs + 4 $space_sm;
27
- border: 1px solid #e4e8f0;
28
- border-radius: $border_rad_heavier;
22
+ .toggle {
23
+ padding: 0px $space_xs + 1;
24
+ }
25
+ .node.tree {
29
26
  display: flex;
30
27
  align-items: center;
31
- justify-content: space-between;
32
- .input_inner_container {
33
- max-width: 90%;
34
- }
28
+ }
35
29
 
36
- input {
37
- border: none;
38
- font-family: $font_family_base;
39
- padding: $space_xs;
40
- &:focus {
41
- outline: none;
42
- }
30
+ .node-label {
31
+ line-height: $lh_tight;
32
+ color: $text_lt_default;
33
+ font-size: $text_default;
34
+ font-weight: $regular;
35
+ font-family: $font-family-base;
36
+ }
37
+
38
+ .checkbox-item {
39
+ height: $space_sm;
40
+ width: $space_sm;
41
+ }
42
+
43
+ .toggle.expanded:after {
44
+ border-style: solid;
45
+ border-width: 0.1em 0.1em 0 0;
46
+ content: "";
47
+ display: inline-block;
48
+ height: 0.8em;
49
+ position: relative;
50
+ vertical-align: top;
51
+ width: 0.8em;
52
+ top: 7px;
53
+ transform: rotate(135deg);
54
+ font-size: 0.5em;
55
+ }
56
+ .toggle.expanded:hover {
57
+ background-color: rgba(0, 86, 207, 0.1);
58
+ border-radius: $border_radius_rounded;
59
+ &::after {
60
+ color: $primary;
43
61
  }
44
62
  }
45
- }
46
- .dropdown_menu {
47
- position: absolute;
48
- z-index: $z_1;
49
- width: 100%;
50
- background-color: $white;
51
- padding: $space_sm $space_sm $space_sm 0;
52
- border-radius: $border_rad_heavier;
53
- border: 1px solid #e4e8f0;
54
- max-height: 600px;
55
- overflow: auto;
63
+ .toggle.collapsed:after {
64
+ border-style: solid;
65
+ border-width: 0.1em 0.1em 0 0;
66
+ content: "";
67
+ display: inline-block;
68
+ height: 0.8em;
69
+ right: 0.1em;
70
+ position: relative;
71
+ vertical-align: top;
72
+ width: 0.8em;
73
+ top: 7px;
74
+ font-size: 0.5em;
75
+ transform: rotate(45deg);
76
+ top: 9px;
77
+ }
56
78
 
57
- ul {
58
- padding: 0px !important;
79
+ .toggle.collapsed:hover {
80
+ background-color: rgba(0, 86, 207, 0.1);
81
+ border-radius: $border_radius_rounded;
82
+ &::after {
83
+ color: $primary;
84
+ }
59
85
  }
60
86
 
61
- .dropdown_item {
62
- list-style: none;
63
- padding-left: 20px;
64
- .dropdown_item_checkbox_row {
65
- display: flex;
66
- align-items: center;
67
- .pb_checkbox_kit {
68
- align-items: center;
69
- }
70
- .pb_button_kit_link_inline_enabled {
71
- color: $charcoal;
72
- &:hover {
73
- color: $primary;
74
- }
75
- }
87
+ .tag {
88
+ height: fit-content;
89
+ display: inline-flex;
90
+ justify-content: center;
91
+ align-items: center;
92
+ padding: $space_xxs $space_xxs $space_xxs $space_xs;
93
+ border-radius: $border_radius_xl + 2;
94
+ background-color: rgba($primary, 0.1);
95
+ color: $primary;
96
+ border: none;
97
+ font-size: $font_smaller;
98
+ font-weight: $bolder;
99
+
100
+ .tag-remove {
101
+ color: $primary;
102
+ padding-left: $space_xs;
103
+ padding-right: $space_xxs;
76
104
  }
77
105
  }
78
106
  }
79
-
80
- .close {
81
- display: none;
107
+ .react-dropdown-tree-select .dropdown .dropdown-trigger {
108
+ width: 100%;
109
+ @include pb_textarea_light;
110
+ }
111
+ .react-dropdown-tree-select .dropdown .dropdown-trigger.arrow.bottom:after {
112
+ content: none;
113
+ }
114
+ .react-dropdown-tree-select .dropdown .dropdown-trigger.arrow.top:after {
115
+ content: none;
82
116
  }
83
117
 
84
- .open {
85
- display: block;
118
+ .react-dropdown-tree-select .dropdown .dropdown-content {
119
+ width: 100%;
120
+ border: 1px solid $border_light;
121
+ border-radius: $border_rad_heavier;
122
+ box-shadow: $shadow_deeper;
123
+ }
124
+ .node.leaf.collapsed {
125
+ display: block !important;
86
126
  }
87
127
  }