playbook_ui_docs 12.25.0.pre.alpha.play824786 → 12.25.0.pre.alpha.railsmultilevelimprovements758

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 (31) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_swift.md +1 -82
  3. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.html.erb +4 -4
  4. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.md +1 -1
  5. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_return_all_selected.html.erb +0 -1
  6. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_form.html.erb +72 -0
  7. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +1 -0
  8. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +1 -3
  9. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +0 -1
  10. data/dist/app/components/playbook/pb_docs/kit_api.html.erb +1 -1
  11. data/dist/app/components/playbook/pb_docs/kit_example.html.erb +8 -14
  12. data/dist/app/components/playbook/pb_docs/kit_example.rb +2 -9
  13. data/dist/menu.yml +0 -1
  14. data/dist/pb_doc_helper.rb +1 -4
  15. data/dist/playbook-doc.js +61 -61
  16. metadata +3 -17
  17. data/app/pb_kits/playbook/pb_detail/docs/_description.md +0 -1
  18. data/app/pb_kits/playbook/pb_detail/docs/_detail_bold.html.erb +0 -34
  19. data/app/pb_kits/playbook/pb_detail/docs/_detail_bold.jsx +0 -49
  20. data/app/pb_kits/playbook/pb_detail/docs/_detail_bold.md +0 -1
  21. data/app/pb_kits/playbook/pb_detail/docs/_detail_colors.html.erb +0 -24
  22. data/app/pb_kits/playbook/pb_detail/docs/_detail_colors.jsx +0 -38
  23. data/app/pb_kits/playbook/pb_detail/docs/_detail_colors.md +0 -6
  24. data/app/pb_kits/playbook/pb_detail/docs/_detail_default.html.erb +0 -3
  25. data/app/pb_kits/playbook/pb_detail/docs/_detail_default.jsx +0 -13
  26. data/app/pb_kits/playbook/pb_detail/docs/_detail_styled.html.erb +0 -22
  27. data/app/pb_kits/playbook/pb_detail/docs/_detail_styled.jsx +0 -32
  28. data/app/pb_kits/playbook/pb_detail/docs/example.yml +0 -11
  29. data/app/pb_kits/playbook/pb_detail/docs/index.js +0 -4
  30. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.html.erb +0 -14
  31. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.jsx +0 -60
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: 12.25.0.pre.alpha.play824786
4
+ version: 12.25.0.pre.alpha.railsmultilevelimprovements758
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: 2023-06-15 00:00:00.000000000 Z
12
+ date: 2023-06-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: playbook_ui
@@ -419,19 +419,6 @@ files:
419
419
  - app/pb_kits/playbook/pb_date_year_stacked/docs/_footer.md
420
420
  - app/pb_kits/playbook/pb_date_year_stacked/docs/example.yml
421
421
  - app/pb_kits/playbook/pb_date_year_stacked/docs/index.js
422
- - app/pb_kits/playbook/pb_detail/docs/_description.md
423
- - app/pb_kits/playbook/pb_detail/docs/_detail_bold.html.erb
424
- - app/pb_kits/playbook/pb_detail/docs/_detail_bold.jsx
425
- - app/pb_kits/playbook/pb_detail/docs/_detail_bold.md
426
- - app/pb_kits/playbook/pb_detail/docs/_detail_colors.html.erb
427
- - app/pb_kits/playbook/pb_detail/docs/_detail_colors.jsx
428
- - app/pb_kits/playbook/pb_detail/docs/_detail_colors.md
429
- - app/pb_kits/playbook/pb_detail/docs/_detail_default.html.erb
430
- - app/pb_kits/playbook/pb_detail/docs/_detail_default.jsx
431
- - app/pb_kits/playbook/pb_detail/docs/_detail_styled.html.erb
432
- - app/pb_kits/playbook/pb_detail/docs/_detail_styled.jsx
433
- - app/pb_kits/playbook/pb_detail/docs/example.yml
434
- - app/pb_kits/playbook/pb_detail/docs/index.js
435
422
  - app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.html.erb
436
423
  - app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.jsx
437
424
  - app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.md
@@ -835,6 +822,7 @@ files:
835
822
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_return_all_selected.html.erb
836
823
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_return_all_selected.jsx
837
824
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_return_all_selected.md
825
+ - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_form.html.erb
838
826
  - app/pb_kits/playbook/pb_multi_level_select/docs/example.yml
839
827
  - app/pb_kits/playbook/pb_multi_level_select/docs/index.js
840
828
  - app/pb_kits/playbook/pb_multiple_users/docs/_description.md
@@ -949,8 +937,6 @@ files:
949
937
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_preferred_countries.html.erb
950
938
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_preferred_countries.jsx
951
939
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_preferred_countries.md
952
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.html.erb
953
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.jsx
954
940
  - app/pb_kits/playbook/pb_phone_number_input/docs/example.yml
955
941
  - app/pb_kits/playbook/pb_phone_number_input/docs/index.js
956
942
  - app/pb_kits/playbook/pb_pill/docs/_description.md
@@ -1 +0,0 @@
1
- Used for tables or designs with large amounts of data or text.
@@ -1,34 +0,0 @@
1
- <%= pb_rails("detail", props: {
2
- bold: true,
3
- text: "I am a bold detail kit"
4
- }) %>
5
-
6
- <%= pb_rails("detail", props: {
7
- bold: true,
8
- color: "default",
9
- text: "I am a bold detail kit"
10
- }) %>
11
-
12
- <%= pb_rails("detail", props: {
13
- bold: true,
14
- color: "lighter",
15
- text: "I am a bold detail kit"
16
- }) %>
17
-
18
- <%= pb_rails("detail", props: {
19
- bold: true,
20
- color: "link",
21
- text: "I am a bold detail kit"
22
- }) %>
23
-
24
- <%= pb_rails("detail", props: {
25
- bold: true,
26
- color: "error",
27
- text: "I am a bold detail kit"
28
- }) %>
29
-
30
- <%= pb_rails("detail", props: {
31
- bold: true,
32
- color: "success",
33
- text: "I am a bold detail kit"
34
- }) %>
@@ -1,49 +0,0 @@
1
- import React from 'react'
2
- import { Detail } from '../..'
3
-
4
- const DetailBold = (props) => (
5
- <div>
6
- <Detail
7
- bold
8
- text="I am a bold detail kit"
9
- {...props}
10
- />
11
-
12
- <Detail
13
- bold
14
- color="default"
15
- text="I am a bold detail kit"
16
- {...props}
17
- />
18
-
19
- <Detail
20
- bold
21
- color="lighter"
22
- text="I am a bold detail kit"
23
- {...props}
24
- />
25
-
26
- <Detail
27
- bold
28
- color="link"
29
- text="I am a bold detail kit"
30
- {...props}
31
- />
32
-
33
- <Detail
34
- bold
35
- color="error"
36
- text="I am a bold detail kit"
37
- {...props}
38
- />
39
-
40
- <Detail
41
- bold
42
- color="success"
43
- text="I am a bold detail kit"
44
- {...props}
45
- />
46
- </div>
47
- )
48
-
49
- export default DetailBold
@@ -1 +0,0 @@
1
- Use the `bold` prop to strongly emphasis your text.
@@ -1,24 +0,0 @@
1
- <%= pb_rails("detail", props: {
2
- text: "I am a detail kit",
3
- color: "default"
4
- }) %>
5
-
6
- <%= pb_rails("detail", props: {
7
- text: "I am a detail kit",
8
- color: "lighter"
9
- }) %>
10
-
11
- <%= pb_rails("detail", props: {
12
- text: "I am a detail kit",
13
- color: "link"
14
- }) %>
15
-
16
- <%= pb_rails("detail", props: {
17
- text: "I am a detail kit",
18
- color: "error"
19
- }) %>
20
-
21
- <%= pb_rails("detail", props: {
22
- text: "I am a detail kit",
23
- color: "success"
24
- }) %>
@@ -1,38 +0,0 @@
1
- import React from 'react'
2
- import { Detail } from '../..'
3
-
4
- const DetailColors = (props) => (
5
- <div>
6
- <Detail
7
- color="default"
8
- text="I am a detail kit"
9
- {...props}
10
- />
11
-
12
- <Detail
13
- color="lighter"
14
- text="I am a detail kit"
15
- {...props}
16
- />
17
-
18
- <Detail
19
- color="link"
20
- text="I am a detail kit"
21
- {...props}
22
- />
23
-
24
- <Detail
25
- color="error"
26
- text="I am a detail kit"
27
- {...props}
28
- />
29
-
30
- <Detail
31
- color="success"
32
- text="I am a detail kit"
33
- {...props}
34
- />
35
- </div>
36
- )
37
-
38
- export default DetailColors
@@ -1,6 +0,0 @@
1
- ##### Prop
2
- This kit uses the `light` color by default, and can be replaced with colors below:
3
-
4
- `default` `lighter` `link` `error` `success`
5
-
6
- These colors are not for standard usage. You can use the `color` prop to make fixes if colors are not appearing properly, but consult your UX team members if you are deciding to implement it.
@@ -1,3 +0,0 @@
1
- <%= pb_rails("detail", props: {
2
- text: "I am a detail kit"
3
- }) %>
@@ -1,13 +0,0 @@
1
- import React from 'react'
2
- import { Detail } from '../..'
3
-
4
- const DetailDefault = (props) => (
5
- <div>
6
- <Detail
7
- text="I am a detail kit"
8
- {...props}
9
- />
10
- </div>
11
- )
12
-
13
- export default DetailDefault
@@ -1,22 +0,0 @@
1
- <%= pb_rails("detail") do %>
2
- <b>This text is using the <%="<b>"%> tag.</b>
3
- <br />
4
- <br />
5
- <strong>This text is using the <%="<strong>"%> tag.</strong>
6
- <br />
7
- <br />
8
- <a>This text is using the <%="<a>"%> tag.</a>
9
- <br />
10
- <br />
11
- <i>This text is using the <%="<i>"%> tag.</i>
12
- <br />
13
- <br />
14
- This <em>word</em> is using an <%="<em>"%> tag.
15
- <br />
16
- <br />
17
- <small>This text is using the <%="<small>"%> tag.</small>
18
- <br />
19
- <br />
20
- <u>This text is using the <%="<u>"%> tag.</u>
21
- <br />
22
- <% end %>
@@ -1,32 +0,0 @@
1
- import React from 'react'
2
- import { Detail } from '../..'
3
-
4
- const DetailStyled = (props) => (
5
- <>
6
- <Detail {...props}>
7
- <b>{"This text is using the <b> tag."}</b>
8
- <br />
9
- <br />
10
- <strong>{"This text is using the <strong> tag."}</strong>
11
- <br />
12
- <br />
13
- <a>{"This text is using the <a> tag."}</a>
14
- <br />
15
- <br />
16
- <i>{"This text is using the <i> tag."}</i>
17
- <br />
18
- <br />
19
- {"This "}<em>{"word"}</em>{" is using an <em> tag."}
20
- <br />
21
- <br />
22
- <small>{"This text is using the <small> tag."}</small>
23
- <br />
24
- <br />
25
- <u>{"This text is using the <u> tag."}</u>
26
- <br />
27
- <br />
28
- </Detail>
29
- </>
30
- )
31
-
32
- export default DetailStyled
@@ -1,11 +0,0 @@
1
- examples:
2
-
3
- rails:
4
- - detail_default: Default
5
- - detail_colors: Colors
6
- - detail_bold: Bold
7
-
8
- react:
9
- - detail_default: Default
10
- - detail_colors: Colors
11
- - detail_bold: Bold
@@ -1,4 +0,0 @@
1
- export { default as DetailDefault } from './_detail_default.jsx'
2
- export { default as DetailColors } from './_detail_colors.jsx'
3
- export { default as DetailStyled } from './_detail_styled.jsx'
4
- export { default as DetailBold } from './_detail_bold.jsx'
@@ -1,14 +0,0 @@
1
- <form id="example-form-validation" action="" method="get">
2
- <%= pb_rails("phone_number_input", props: { error: "Missing phone number.", id: "validation", initial_country: "af", value: "", required: true }) %>
3
- <%= pb_rails("button", props: {html_type: "submit", text: "Save Phone Number"}) %>
4
- </form>
5
-
6
- <% content_for(:pb_js) do %>
7
- <%= javascript_tag do %>
8
- document.addEventListener('DOMContentLoaded', function () {
9
- document.querySelector('#example-form-validation').addEventListener('submit', function (e) {
10
- if (e.target.querySelectorAll('[error]:not([error=""])').length > 0) e.preventDefault();
11
- })
12
- })
13
- <% end %>
14
- <% end %>
@@ -1,60 +0,0 @@
1
- import React, { useEffect, useState } from "react";
2
- import { Button, FixedConfirmationToast, PhoneNumberInput } from "../../";
3
-
4
- const PhoneNumberInputValidation = (props) => {
5
- const [formErrors, setFormErrors] = useState("");
6
- const [showFormErrors, setShowFormErrors] = useState(false);
7
- const [phoneNumber, setPhoneNumber] = useState("");
8
- const [countryCode, setCountryCode] = useState("af");
9
-
10
- const handleOnValidate = (valid) => {
11
- setFormErrors(
12
- valid ? "" : "Please correct the fields below and try again."
13
- );
14
- };
15
-
16
- const handleOnChange = ({ iso2, number }) => {
17
- setCountryCode(iso2);
18
- setPhoneNumber(number);
19
- };
20
-
21
- const handleOnSubmit = (e) => {
22
- if (showFormErrors) e.preventDefault()
23
- }
24
-
25
- useEffect(() => {
26
- setShowFormErrors(formErrors.length > 0);
27
- }, [formErrors]);
28
-
29
- return (
30
- <form
31
- action=""
32
- method="get"
33
- onSubmit={handleOnSubmit}
34
- >
35
- {showFormErrors && (
36
- <FixedConfirmationToast
37
- marginBottom="md"
38
- status="error"
39
- text={formErrors}
40
- />
41
- )}
42
- <PhoneNumberInput
43
- error="Missing phone number."
44
- id="validation"
45
- initialCountry={countryCode}
46
- onChange={handleOnChange}
47
- onValidate={handleOnValidate}
48
- required
49
- value={phoneNumber}
50
- {...props}
51
- />
52
- <Button
53
- htmlType="submit"
54
- text="Save Phone Number"
55
- />
56
- </form>
57
- );
58
- };
59
-
60
- export default PhoneNumberInputValidation;