playbook_ui 16.5.0 → 16.6.0.pre.alpha.RTEPOC15801
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/kit.schema.json +278 -0
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +33 -0
- data/app/pb_kits/playbook/pb_avatar/kit.schema.json +86 -0
- data/app/pb_kits/playbook/pb_background/kit.schema.json +208 -0
- data/app/pb_kits/playbook/pb_badge/kit.schema.json +73 -0
- data/app/pb_kits/playbook/pb_body/kit.schema.json +101 -0
- data/app/pb_kits/playbook/pb_bread_crumbs/kit.schema.json +28 -0
- data/app/pb_kits/playbook/pb_button/docs/{_button_loading.html.erb → _button_loading_rails.html.erb} +5 -5
- data/app/pb_kits/playbook/pb_button/docs/_button_loading_rails.md +3 -0
- data/app/pb_kits/playbook/pb_button/docs/example.yml +1 -1
- data/app/pb_kits/playbook/pb_button/kit.schema.json +207 -0
- data/app/pb_kits/playbook/pb_button_toolbar/kit.schema.json +67 -0
- data/app/pb_kits/playbook/pb_caption/kit.schema.json +91 -0
- data/app/pb_kits/playbook/pb_card/kit.schema.json +168 -0
- data/app/pb_kits/playbook/pb_checkbox/kit.schema.json +143 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/kit.schema.json +117 -0
- data/app/pb_kits/playbook/pb_collapsible/kit.schema.json +90 -0
- data/app/pb_kits/playbook/pb_contact/kit.schema.json +59 -0
- data/app/pb_kits/playbook/pb_copy_button/kit.schema.json +94 -0
- data/app/pb_kits/playbook/pb_currency/kit.schema.json +142 -0
- data/app/pb_kits/playbook/pb_dashboard_value/kit.schema.json +54 -0
- data/app/pb_kits/playbook/pb_date/kit.schema.json +98 -0
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +1 -0
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +35 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_dialog_submission.jsx +62 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_dialog_submission.md +1 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_date_picker/kit.schema.json +375 -0
- data/app/pb_kits/playbook/pb_date_range_inline/kit.schema.json +76 -0
- data/app/pb_kits/playbook/pb_date_range_stacked/kit.schema.json +36 -0
- data/app/pb_kits/playbook/pb_date_stacked/kit.schema.json +78 -0
- data/app/pb_kits/playbook/pb_date_time/kit.schema.json +96 -0
- data/app/pb_kits/playbook/pb_date_time_stacked/kit.schema.json +62 -0
- data/app/pb_kits/playbook/pb_date_year_stacked/kit.schema.json +42 -0
- data/app/pb_kits/playbook/pb_detail/kit.schema.json +72 -0
- data/app/pb_kits/playbook/pb_dialog/kit.schema.json +186 -0
- data/app/pb_kits/playbook/pb_distribution_bar/kit.schema.json +48 -0
- data/app/pb_kits/playbook/pb_draggable/kit.schema.json +60 -0
- data/app/pb_kits/playbook/pb_dropdown/kit.schema.json +244 -0
- data/app/pb_kits/playbook/pb_empty_state/kit.schema.json +117 -0
- data/app/pb_kits/playbook/pb_file_upload/kit.schema.json +124 -0
- data/app/pb_kits/playbook/pb_filter/Filter/ResultsCount.tsx +3 -1
- data/app/pb_kits/playbook/pb_filter/filter.rb +1 -1
- data/app/pb_kits/playbook/pb_filter/kit.schema.json +87 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/kit.schema.json +118 -0
- data/app/pb_kits/playbook/pb_flex/kit.schema.json +151 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +5 -5
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validation_msg.html.erb +90 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validation_msg.md +13 -0
- data/app/pb_kits/playbook/pb_form/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_form/kit.schema.json +53 -0
- data/app/pb_kits/playbook/pb_form/pb_form_validation.js +3 -1
- data/app/pb_kits/playbook/pb_form_group/kit.schema.json +30 -0
- data/app/pb_kits/playbook/pb_form_pill/kit.schema.json +132 -0
- data/app/pb_kits/playbook/pb_hashtag/kit.schema.json +71 -0
- data/app/pb_kits/playbook/pb_highlight/kit.schema.json +35 -0
- data/app/pb_kits/playbook/pb_home_address_street/kit.schema.json +121 -0
- data/app/pb_kits/playbook/pb_icon/kit.schema.json +180 -0
- data/app/pb_kits/playbook/pb_icon_button/kit.schema.json +116 -0
- data/app/pb_kits/playbook/pb_icon_circle/kit.schema.json +65 -0
- data/app/pb_kits/playbook/pb_icon_stat_value/kit.schema.json +96 -0
- data/app/pb_kits/playbook/pb_icon_value/kit.schema.json +49 -0
- data/app/pb_kits/playbook/pb_image/kit.schema.json +74 -0
- data/app/pb_kits/playbook/pb_label_pill/kit.schema.json +52 -0
- data/app/pb_kits/playbook/pb_label_value/kit.schema.json +84 -0
- data/app/pb_kits/playbook/pb_layout/kit.schema.json +107 -0
- data/app/pb_kits/playbook/pb_legend/kit.schema.json +44 -0
- data/app/pb_kits/playbook/pb_link/kit.schema.json +118 -0
- data/app/pb_kits/playbook/pb_list/kit.schema.json +110 -0
- data/app/pb_kits/playbook/pb_loading_inline/kit.schema.json +55 -0
- data/app/pb_kits/playbook/pb_map/kit.schema.json +51 -0
- data/app/pb_kits/playbook/pb_message/kit.schema.json +104 -0
- data/app/pb_kits/playbook/pb_multi_level_select/kit.schema.json +190 -0
- data/app/pb_kits/playbook/pb_multiple_users/kit.schema.json +67 -0
- data/app/pb_kits/playbook/pb_multiple_users_stacked/kit.schema.json +55 -0
- data/app/pb_kits/playbook/pb_nav/kit.schema.json +104 -0
- data/app/pb_kits/playbook/pb_online_status/kit.schema.json +62 -0
- data/app/pb_kits/playbook/pb_overlay/kit.schema.json +99 -0
- data/app/pb_kits/playbook/pb_pagination/kit.schema.json +56 -0
- data/app/pb_kits/playbook/pb_passphrase/kit.schema.json +94 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/kit.schema.json +29 -0
- data/app/pb_kits/playbook/pb_pb_circle_chart/kit.schema.json +29 -0
- data/app/pb_kits/playbook/pb_pb_gauge_chart/kit.schema.json +29 -0
- data/app/pb_kits/playbook/pb_pb_line_graph/kit.schema.json +29 -0
- data/app/pb_kits/playbook/pb_person/kit.schema.json +36 -0
- data/app/pb_kits/playbook/pb_person_contact/kit.schema.json +43 -0
- data/app/pb_kits/playbook/pb_phone_number_input/kit.schema.json +157 -0
- data/app/pb_kits/playbook/pb_pill/kit.schema.json +57 -0
- data/app/pb_kits/playbook/pb_popover/kit.schema.json +82 -0
- data/app/pb_kits/playbook/pb_progress_pills/kit.schema.json +60 -0
- data/app/pb_kits/playbook/pb_progress_simple/kit.schema.json +78 -0
- data/app/pb_kits/playbook/pb_progress_step/kit.schema.json +74 -0
- data/app/pb_kits/playbook/pb_radio/kit.schema.json +104 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +262 -43
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_default.html.erb +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_default.md +12 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_simple.html.erb +9 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_rails_simple.md +8 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/kit.schema.json +160 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.html.erb +218 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb +71 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor_rails.js +201 -0
- data/app/pb_kits/playbook/pb_section_separator/kit.schema.json +77 -0
- data/app/pb_kits/playbook/pb_select/kit.schema.json +157 -0
- data/app/pb_kits/playbook/pb_select/select.rb +7 -0
- data/app/pb_kits/playbook/pb_selectable_card/kit.schema.json +116 -0
- data/app/pb_kits/playbook/pb_selectable_card_icon/kit.schema.json +116 -0
- data/app/pb_kits/playbook/pb_selectable_icon/kit.schema.json +103 -0
- data/app/pb_kits/playbook/pb_selectable_list/kit.schema.json +54 -0
- data/app/pb_kits/playbook/pb_skeleton_loading/kit.schema.json +42 -0
- data/app/pb_kits/playbook/pb_source/kit.schema.json +61 -0
- data/app/pb_kits/playbook/pb_star_rating/kit.schema.json +152 -0
- data/app/pb_kits/playbook/pb_stat_change/kit.schema.json +49 -0
- data/app/pb_kits/playbook/pb_stat_value/kit.schema.json +42 -0
- data/app/pb_kits/playbook/pb_table/kit.schema.json +238 -0
- data/app/pb_kits/playbook/pb_text_input/kit.schema.json +155 -0
- data/app/pb_kits/playbook/pb_textarea/kit.schema.json +163 -0
- data/app/pb_kits/playbook/pb_time/kit.schema.json +96 -0
- data/app/pb_kits/playbook/pb_time_picker/kit.schema.json +143 -0
- data/app/pb_kits/playbook/pb_time_range_inline/kit.schema.json +77 -0
- data/app/pb_kits/playbook/pb_time_stacked/kit.schema.json +60 -0
- data/app/pb_kits/playbook/pb_timeline/kit.schema.json +57 -0
- data/app/pb_kits/playbook/pb_timestamp/kit.schema.json +126 -0
- data/app/pb_kits/playbook/pb_title/kit.schema.json +106 -0
- data/app/pb_kits/playbook/pb_title_count/kit.schema.json +61 -0
- data/app/pb_kits/playbook/pb_title_detail/kit.schema.json +49 -0
- data/app/pb_kits/playbook/pb_toggle/kit.schema.json +76 -0
- data/app/pb_kits/playbook/pb_tooltip/kit.schema.json +110 -0
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +4 -4
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_createable.html.erb +29 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_createable.md +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_typeahead/kit.schema.json +281 -0
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +4 -1
- data/app/pb_kits/playbook/pb_user/kit.schema.json +147 -0
- data/app/pb_kits/playbook/pb_user_badge/kit.schema.json +47 -0
- data/app/pb_kits/playbook/pb_weekday_stacked/kit.schema.json +63 -0
- data/app/pb_kits/playbook/utilities/global-props.schema.json +759 -0
- data/dist/chunks/{_pb_line_graph-DHY2Tea7.js → _pb_line_graph-EzcacMw_.js} +1 -1
- data/dist/chunks/_typeahead-BYUXg9ZT.js +1 -0
- data/dist/chunks/{globalProps-C893Xh66.js → globalProps-6Hsm3bJX.js} +1 -1
- data/dist/chunks/lib-o4u12zAw.js +29 -0
- data/dist/chunks/vendor.js +3 -3
- data/dist/menu.yml +77 -40
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/forms/builder/collection_select_field.rb +1 -0
- data/lib/playbook/forms/builder/date_picker_field.rb +1 -0
- data/lib/playbook/forms/builder/select_field.rb +1 -0
- data/lib/playbook/forms/builder/time_zone_select_field.rb +1 -0
- data/lib/playbook/pb_forms_helper.rb +17 -2
- data/lib/playbook/version.rb +2 -2
- metadata +129 -8
- data/app/pb_kits/playbook/utilities/globalPropNames.mjs +0 -58
- data/dist/chunks/_typeahead-DXmvtkzR.js +0 -1
- data/dist/chunks/lib-9kTaI6nm.js +0 -29
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://playbook.powerapp.cloud/schemas/kit-schema.json",
|
|
3
|
+
"name": "Badge",
|
|
4
|
+
"description": "Badge component",
|
|
5
|
+
"platforms": [
|
|
6
|
+
"react",
|
|
7
|
+
"rails"
|
|
8
|
+
],
|
|
9
|
+
"props": {
|
|
10
|
+
"removeIcon": {
|
|
11
|
+
"type": "boolean",
|
|
12
|
+
"platforms": [
|
|
13
|
+
"react"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"removeOnClick": {
|
|
17
|
+
"type": "ReactNode",
|
|
18
|
+
"platforms": [
|
|
19
|
+
"react"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"rounded": {
|
|
23
|
+
"type": "boolean",
|
|
24
|
+
"platforms": [
|
|
25
|
+
"react",
|
|
26
|
+
"rails"
|
|
27
|
+
],
|
|
28
|
+
"default": false
|
|
29
|
+
},
|
|
30
|
+
"tabIndex": {
|
|
31
|
+
"type": "number",
|
|
32
|
+
"platforms": [
|
|
33
|
+
"react"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"text": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"platforms": [
|
|
39
|
+
"react",
|
|
40
|
+
"rails"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"variant": {
|
|
44
|
+
"type": "enum",
|
|
45
|
+
"platforms": [
|
|
46
|
+
"react",
|
|
47
|
+
"rails"
|
|
48
|
+
],
|
|
49
|
+
"values": [
|
|
50
|
+
"error",
|
|
51
|
+
"info",
|
|
52
|
+
"neutral",
|
|
53
|
+
"notification",
|
|
54
|
+
"notificationError",
|
|
55
|
+
"primary",
|
|
56
|
+
"success",
|
|
57
|
+
"warning"
|
|
58
|
+
],
|
|
59
|
+
"default": "neutral"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"globalProps": true,
|
|
63
|
+
"usage": {
|
|
64
|
+
"react": {
|
|
65
|
+
"import": "import { Badge } from 'playbook-ui'",
|
|
66
|
+
"example": "<Badge variant=\"error\"></Badge>"
|
|
67
|
+
},
|
|
68
|
+
"rails": {
|
|
69
|
+
"import": null,
|
|
70
|
+
"example": "<%= pb_rails(\"badge\", props: { variant: \"error\" }) %>"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://playbook.powerapp.cloud/schemas/kit-schema.json",
|
|
3
|
+
"name": "Body",
|
|
4
|
+
"description": "Body component",
|
|
5
|
+
"platforms": [
|
|
6
|
+
"react",
|
|
7
|
+
"rails"
|
|
8
|
+
],
|
|
9
|
+
"props": {
|
|
10
|
+
"color": {
|
|
11
|
+
"type": "enum",
|
|
12
|
+
"platforms": [
|
|
13
|
+
"react",
|
|
14
|
+
"rails"
|
|
15
|
+
],
|
|
16
|
+
"values": [
|
|
17
|
+
"default",
|
|
18
|
+
"light",
|
|
19
|
+
"lighter",
|
|
20
|
+
"link",
|
|
21
|
+
"error",
|
|
22
|
+
"success"
|
|
23
|
+
],
|
|
24
|
+
"default": "default"
|
|
25
|
+
},
|
|
26
|
+
"highlightedText": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"platforms": [
|
|
29
|
+
"react",
|
|
30
|
+
"rails"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"highlighting": {
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"platforms": [
|
|
36
|
+
"react",
|
|
37
|
+
"rails"
|
|
38
|
+
],
|
|
39
|
+
"default": false
|
|
40
|
+
},
|
|
41
|
+
"status": {
|
|
42
|
+
"type": "enum",
|
|
43
|
+
"platforms": [
|
|
44
|
+
"react",
|
|
45
|
+
"rails"
|
|
46
|
+
],
|
|
47
|
+
"values": [
|
|
48
|
+
"neutral",
|
|
49
|
+
"negative",
|
|
50
|
+
"positive"
|
|
51
|
+
],
|
|
52
|
+
"default": "neutral"
|
|
53
|
+
},
|
|
54
|
+
"tag": {
|
|
55
|
+
"type": "enum",
|
|
56
|
+
"platforms": [
|
|
57
|
+
"react",
|
|
58
|
+
"rails"
|
|
59
|
+
],
|
|
60
|
+
"values": [
|
|
61
|
+
"h1",
|
|
62
|
+
"h2",
|
|
63
|
+
"h3",
|
|
64
|
+
"h4",
|
|
65
|
+
"h5",
|
|
66
|
+
"h6",
|
|
67
|
+
"p",
|
|
68
|
+
"span",
|
|
69
|
+
"div"
|
|
70
|
+
],
|
|
71
|
+
"default": "div"
|
|
72
|
+
},
|
|
73
|
+
"text": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"platforms": [
|
|
76
|
+
"react",
|
|
77
|
+
"rails"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"variant": {
|
|
81
|
+
"type": "enum",
|
|
82
|
+
"platforms": [
|
|
83
|
+
"react"
|
|
84
|
+
],
|
|
85
|
+
"values": [
|
|
86
|
+
"link"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"globalProps": true,
|
|
91
|
+
"usage": {
|
|
92
|
+
"react": {
|
|
93
|
+
"import": "import { Body } from 'playbook-ui'",
|
|
94
|
+
"example": "<Body color=\"default\" status=\"neutral\"></Body>"
|
|
95
|
+
},
|
|
96
|
+
"rails": {
|
|
97
|
+
"import": null,
|
|
98
|
+
"example": "<%= pb_rails(\"body\", props: { color: \"default\", status: \"neutral\" }) %>"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://playbook.powerapp.cloud/schemas/kit-schema.json",
|
|
3
|
+
"name": "BreadCrumbs",
|
|
4
|
+
"description": "BreadCrumbs component",
|
|
5
|
+
"platforms": [
|
|
6
|
+
"react",
|
|
7
|
+
"rails"
|
|
8
|
+
],
|
|
9
|
+
"props": {
|
|
10
|
+
"text": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"platforms": [
|
|
13
|
+
"react"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"globalProps": true,
|
|
18
|
+
"usage": {
|
|
19
|
+
"react": {
|
|
20
|
+
"import": "import { BreadCrumbs } from 'playbook-ui'",
|
|
21
|
+
"example": "<BreadCrumbs></BreadCrumbs>"
|
|
22
|
+
},
|
|
23
|
+
"rails": {
|
|
24
|
+
"import": null,
|
|
25
|
+
"example": "<%= pb_rails(\"bread_crumbs\", props: { text: \"Example\" }) %>"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
data/app/pb_kits/playbook/pb_button/docs/{_button_loading.html.erb → _button_loading_rails.html.erb}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%= pb_rails("caption", props: { margin_y: "md", text: "Button variants with loading" }) %>
|
|
2
|
-
<%= pb_rails("button", props: { aria: { label: "Loading" }, loading: true, margin_right: "lg" }) %>
|
|
3
|
-
<%= pb_rails("button", props: { aria: { label: "Loading" }, variant: "secondary", loading: true, margin_right: "lg" }) %>
|
|
4
|
-
<%= pb_rails("button", props: { aria: { label: "Loading" }, variant: "link", loading: true, margin_right: "lg" }) %>
|
|
2
|
+
<%= pb_rails("button", props: { aria: { label: "Loading" }, loading: true, text: "Loading", margin_right: "lg" }) %>
|
|
3
|
+
<%= pb_rails("button", props: { aria: { label: "Loading" }, variant: "secondary", loading: true, text: "Loading", margin_right: "lg" }) %>
|
|
4
|
+
<%= pb_rails("button", props: { aria: { label: "Loading" }, variant: "link", loading: true, text: "Loading", margin_right: "lg" }) %>
|
|
5
5
|
<%= pb_rails("caption", props: { margin_y: "md", text: "Button sizes with loading" }) %>
|
|
6
|
-
<%= pb_rails("button", props: { aria: { label: "Loading" }, loading: true, size: "sm", margin_right: "lg" }) %>
|
|
7
|
-
<%= pb_rails("button", props: { aria: { label: "Loading" }, loading: true, size: "lg", margin_right: "lg" }) %>
|
|
6
|
+
<%= pb_rails("button", props: { aria: { label: "Loading" }, loading: true, size: "sm", text: "Loading", margin_right: "lg" }) %>
|
|
7
|
+
<%= pb_rails("button", props: { aria: { label: "Loading" }, loading: true, size: "lg", text: "Loading", margin_right: "lg" }) %>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
Used when a button will take a little while to load. The spinner lets the user know that the button has worked and it is in the process of loading.
|
|
2
|
+
|
|
3
|
+
**NOTE**: In Rails, both the button text and loading spinner are rendered at the same time, and visibility is toggled between them. Even though the text prop is not required, providing it ensures the button maintains its correct shape during loading.
|
|
@@ -4,7 +4,7 @@ examples:
|
|
|
4
4
|
- button_reaction: Reaction Button
|
|
5
5
|
- button_full_width: Button Full Width
|
|
6
6
|
- button_link: Button Links
|
|
7
|
-
-
|
|
7
|
+
- button_loading_rails: Button Loading
|
|
8
8
|
- button_block_content: Button Block Content
|
|
9
9
|
- button_icon_options: Button Icon Options
|
|
10
10
|
- button_accessibility: Button Accessibility Options
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://playbook.powerapp.cloud/schemas/kit-schema.json",
|
|
3
|
+
"name": "Button",
|
|
4
|
+
"description": "Button component",
|
|
5
|
+
"platforms": [
|
|
6
|
+
"react",
|
|
7
|
+
"rails"
|
|
8
|
+
],
|
|
9
|
+
"props": {
|
|
10
|
+
"count": {
|
|
11
|
+
"type": "number",
|
|
12
|
+
"platforms": [
|
|
13
|
+
"react",
|
|
14
|
+
"rails"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"disabled": {
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"platforms": [
|
|
20
|
+
"react",
|
|
21
|
+
"rails"
|
|
22
|
+
],
|
|
23
|
+
"default": false
|
|
24
|
+
},
|
|
25
|
+
"fixedWidth": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"platforms": [
|
|
28
|
+
"react"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"form": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"platforms": [
|
|
34
|
+
"react",
|
|
35
|
+
"rails"
|
|
36
|
+
],
|
|
37
|
+
"default": null
|
|
38
|
+
},
|
|
39
|
+
"fullWidth": {
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"platforms": [
|
|
42
|
+
"react",
|
|
43
|
+
"rails"
|
|
44
|
+
],
|
|
45
|
+
"default": false
|
|
46
|
+
},
|
|
47
|
+
"highlight": {
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"platforms": [
|
|
50
|
+
"react",
|
|
51
|
+
"rails"
|
|
52
|
+
],
|
|
53
|
+
"default": false
|
|
54
|
+
},
|
|
55
|
+
"icon": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"platforms": [
|
|
58
|
+
"react",
|
|
59
|
+
"rails"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"iconRight": {
|
|
63
|
+
"type": "boolean",
|
|
64
|
+
"platforms": [
|
|
65
|
+
"react",
|
|
66
|
+
"rails"
|
|
67
|
+
],
|
|
68
|
+
"default": false
|
|
69
|
+
},
|
|
70
|
+
"link": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"platforms": [
|
|
73
|
+
"react",
|
|
74
|
+
"rails"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"loading": {
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"platforms": [
|
|
80
|
+
"react",
|
|
81
|
+
"rails"
|
|
82
|
+
],
|
|
83
|
+
"default": false
|
|
84
|
+
},
|
|
85
|
+
"newWindow": {
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"platforms": [
|
|
88
|
+
"react",
|
|
89
|
+
"rails"
|
|
90
|
+
],
|
|
91
|
+
"default": false
|
|
92
|
+
},
|
|
93
|
+
"onClick": {
|
|
94
|
+
"type": "function",
|
|
95
|
+
"platforms": [
|
|
96
|
+
"react"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"tabIndex": {
|
|
100
|
+
"type": "number",
|
|
101
|
+
"platforms": [
|
|
102
|
+
"react"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"size": {
|
|
106
|
+
"type": "enum",
|
|
107
|
+
"platforms": [
|
|
108
|
+
"react",
|
|
109
|
+
"rails"
|
|
110
|
+
],
|
|
111
|
+
"values": [
|
|
112
|
+
"sm",
|
|
113
|
+
"md",
|
|
114
|
+
"lg"
|
|
115
|
+
],
|
|
116
|
+
"default": null
|
|
117
|
+
},
|
|
118
|
+
"target": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"platforms": [
|
|
121
|
+
"react",
|
|
122
|
+
"rails"
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
"text": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"platforms": [
|
|
128
|
+
"react",
|
|
129
|
+
"rails"
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
"type": {
|
|
133
|
+
"type": "enum",
|
|
134
|
+
"platforms": [
|
|
135
|
+
"react",
|
|
136
|
+
"rails"
|
|
137
|
+
],
|
|
138
|
+
"values": [
|
|
139
|
+
"inline"
|
|
140
|
+
],
|
|
141
|
+
"default": "inline"
|
|
142
|
+
},
|
|
143
|
+
"htmlType": {
|
|
144
|
+
"type": "enum",
|
|
145
|
+
"platforms": [
|
|
146
|
+
"react"
|
|
147
|
+
],
|
|
148
|
+
"values": [
|
|
149
|
+
"submit",
|
|
150
|
+
"reset",
|
|
151
|
+
"button"
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
"value": {
|
|
155
|
+
"type": "string | null",
|
|
156
|
+
"platforms": [
|
|
157
|
+
"react",
|
|
158
|
+
"rails"
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
"variant": {
|
|
162
|
+
"type": "enum",
|
|
163
|
+
"platforms": [
|
|
164
|
+
"react",
|
|
165
|
+
"rails"
|
|
166
|
+
],
|
|
167
|
+
"values": [
|
|
168
|
+
"primary",
|
|
169
|
+
"secondary",
|
|
170
|
+
"link",
|
|
171
|
+
"danger",
|
|
172
|
+
"reaction"
|
|
173
|
+
],
|
|
174
|
+
"default": "primary"
|
|
175
|
+
},
|
|
176
|
+
"wrapperClass": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"platforms": [
|
|
179
|
+
"react"
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
"iconFontFamily": {
|
|
183
|
+
"platforms": [
|
|
184
|
+
"rails"
|
|
185
|
+
],
|
|
186
|
+
"type": "enum",
|
|
187
|
+
"values": [
|
|
188
|
+
"far",
|
|
189
|
+
"fas",
|
|
190
|
+
"fab",
|
|
191
|
+
"fak"
|
|
192
|
+
],
|
|
193
|
+
"default": "far"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"globalProps": true,
|
|
197
|
+
"usage": {
|
|
198
|
+
"react": {
|
|
199
|
+
"import": "import { Button } from 'playbook-ui'",
|
|
200
|
+
"example": "<Button size=\"sm\" type=\"inline\"></Button>"
|
|
201
|
+
},
|
|
202
|
+
"rails": {
|
|
203
|
+
"import": null,
|
|
204
|
+
"example": "<%= pb_rails(\"button\", props: { size: \"sm\", type: \"inline\" }) %>"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://playbook.powerapp.cloud/schemas/kit-schema.json",
|
|
3
|
+
"name": "ButtonToolbar",
|
|
4
|
+
"description": "ButtonToolbar component",
|
|
5
|
+
"platforms": [
|
|
6
|
+
"react",
|
|
7
|
+
"rails"
|
|
8
|
+
],
|
|
9
|
+
"props": {
|
|
10
|
+
"connected": {
|
|
11
|
+
"type": "boolean",
|
|
12
|
+
"platforms": [
|
|
13
|
+
"react",
|
|
14
|
+
"rails"
|
|
15
|
+
],
|
|
16
|
+
"default": false
|
|
17
|
+
},
|
|
18
|
+
"onClick": {
|
|
19
|
+
"type": "ReactNode",
|
|
20
|
+
"platforms": [
|
|
21
|
+
"react"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"orientation": {
|
|
25
|
+
"type": "enum",
|
|
26
|
+
"platforms": [
|
|
27
|
+
"react",
|
|
28
|
+
"rails"
|
|
29
|
+
],
|
|
30
|
+
"values": [
|
|
31
|
+
"horizontal",
|
|
32
|
+
"vertical"
|
|
33
|
+
],
|
|
34
|
+
"default": "horizontal"
|
|
35
|
+
},
|
|
36
|
+
"text": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"platforms": [
|
|
39
|
+
"react",
|
|
40
|
+
"rails"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"variant": {
|
|
44
|
+
"type": "enum",
|
|
45
|
+
"platforms": [
|
|
46
|
+
"react",
|
|
47
|
+
"rails"
|
|
48
|
+
],
|
|
49
|
+
"values": [
|
|
50
|
+
"primary",
|
|
51
|
+
"secondary"
|
|
52
|
+
],
|
|
53
|
+
"default": "primary"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"globalProps": true,
|
|
57
|
+
"usage": {
|
|
58
|
+
"react": {
|
|
59
|
+
"import": "import { ButtonToolbar } from 'playbook-ui'",
|
|
60
|
+
"example": "<ButtonToolbar orientation=\"horizontal\" variant=\"primary\"></ButtonToolbar>"
|
|
61
|
+
},
|
|
62
|
+
"rails": {
|
|
63
|
+
"import": null,
|
|
64
|
+
"example": "<%= pb_rails(\"button_toolbar\", props: { orientation: \"horizontal\", variant: \"primary\" }) %>"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://playbook.powerapp.cloud/schemas/kit-schema.json",
|
|
3
|
+
"name": "Caption",
|
|
4
|
+
"description": "Caption component",
|
|
5
|
+
"platforms": [
|
|
6
|
+
"react",
|
|
7
|
+
"rails"
|
|
8
|
+
],
|
|
9
|
+
"props": {
|
|
10
|
+
"color": {
|
|
11
|
+
"type": "enum",
|
|
12
|
+
"platforms": [
|
|
13
|
+
"react",
|
|
14
|
+
"rails"
|
|
15
|
+
],
|
|
16
|
+
"values": [
|
|
17
|
+
"default",
|
|
18
|
+
"light",
|
|
19
|
+
"lighter",
|
|
20
|
+
"success",
|
|
21
|
+
"error",
|
|
22
|
+
"link"
|
|
23
|
+
],
|
|
24
|
+
"default": null
|
|
25
|
+
},
|
|
26
|
+
"size": {
|
|
27
|
+
"type": "enum",
|
|
28
|
+
"platforms": [
|
|
29
|
+
"react",
|
|
30
|
+
"rails"
|
|
31
|
+
],
|
|
32
|
+
"values": [
|
|
33
|
+
"xs",
|
|
34
|
+
"sm",
|
|
35
|
+
"md",
|
|
36
|
+
"lg",
|
|
37
|
+
"xl"
|
|
38
|
+
],
|
|
39
|
+
"default": "md"
|
|
40
|
+
},
|
|
41
|
+
"tag": {
|
|
42
|
+
"type": "enum",
|
|
43
|
+
"platforms": [
|
|
44
|
+
"react",
|
|
45
|
+
"rails"
|
|
46
|
+
],
|
|
47
|
+
"values": [
|
|
48
|
+
"h1",
|
|
49
|
+
"h2",
|
|
50
|
+
"h3",
|
|
51
|
+
"h4",
|
|
52
|
+
"h5",
|
|
53
|
+
"h6",
|
|
54
|
+
"p",
|
|
55
|
+
"span",
|
|
56
|
+
"div",
|
|
57
|
+
"caption"
|
|
58
|
+
],
|
|
59
|
+
"default": "div"
|
|
60
|
+
},
|
|
61
|
+
"text": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"platforms": [
|
|
64
|
+
"react",
|
|
65
|
+
"rails"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"variant": {
|
|
69
|
+
"type": "enum",
|
|
70
|
+
"platforms": [
|
|
71
|
+
"react",
|
|
72
|
+
"rails"
|
|
73
|
+
],
|
|
74
|
+
"values": [
|
|
75
|
+
"link"
|
|
76
|
+
],
|
|
77
|
+
"default": null
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"globalProps": true,
|
|
81
|
+
"usage": {
|
|
82
|
+
"react": {
|
|
83
|
+
"import": "import { Caption } from 'playbook-ui'",
|
|
84
|
+
"example": "<Caption color=\"default\" size=\"xs\"></Caption>"
|
|
85
|
+
},
|
|
86
|
+
"rails": {
|
|
87
|
+
"import": null,
|
|
88
|
+
"example": "<%= pb_rails(\"caption\", props: { color: \"default\", size: \"xs\" }) %>"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|