playbook_ui 13.0.0.pre.alpha.salesbookmismatchingdate1120 → 13.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.scss +7 -0
- data/app/pb_kits/playbook/pb_file_upload/docs/_description.md +0 -7
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom.html.erb +7 -0
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom.md +1 -0
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_default.html.erb +3 -0
- data/app/pb_kits/playbook/pb_file_upload/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_file_upload/docs/test.html +25 -0
- data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +17 -0
- data/app/pb_kits/playbook/pb_file_upload/file_upload.rb +34 -0
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +0 -1
- data/lib/playbook/version.rb +1 -1
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebfbb350f5457ca825d0c7991f1e2fff2dd63e1a925523715b154af8f9b3b233
|
4
|
+
data.tar.gz: 96c352b2239aa01b2b30446b23520322494ca2d72cd62c456b6835f9f1a6656e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 681a3e6dc4fd90450765d3fd35d34b7dd08b67c67ae79f529b6f18498a8fe986b73360cb06c310eac254307139a2405b51b67d7488ed5983a8cc3daf0130c26f
|
7
|
+
data.tar.gz: af4a5c732a179ca234c04c2dad6835fb3201687233cc49353f0e73f1cf49ddc408b5570b9846d297d109c2a012b62534ba8f669dba5c6a5f006aeaa5f80a7c44
|
@@ -1,7 +0,0 @@
|
|
1
|
-
This kit provides a drag and drop interface for file uploads. Currently, the kit leverages [react-dropzone](https://github.com/react-dropzone/react-dropzone).
|
2
|
-
|
3
|
-
### Props
|
4
|
-
|
5
|
-
`accept: [String]` Use this prop to set the list of valid file types
|
6
|
-
`customMessage: [String]` Use this prop to set a custom message, replacing the default text
|
7
|
-
`onFilesAccepted: Function` The callback function, providing the list of dropped files
|
@@ -0,0 +1 @@
|
|
1
|
+
The `id` for the File Upload and the existing input you are choosing to wrap with our Kit with must match each other. This will ensure that the click on the button a.k.a, the underlying label's `for`, triggers the File Upload.
|
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
<div class="pb_file_upload_kit" id="import_file">
|
3
|
+
<div class="pb_form_group_kit cursor_pointer">
|
4
|
+
<label for="import_file" class="pb_button_kit_secondary_inline_enabled">Upload File</label>
|
5
|
+
<div class="pb_text_input_kit">
|
6
|
+
<div class=" text_input_wrapper">
|
7
|
+
<input placeholder="custom-placeholder" id="import_file" type="file">
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<h1>not custom</h1>
|
14
|
+
|
15
|
+
<div class="pb_file_upload_kit" id="test">
|
16
|
+
<div class="pb_form_group_kit cursor_pointer">
|
17
|
+
<label for="upload-test" class="pb_button_kit_secondary_inline_enabled">Upload File</label>
|
18
|
+
<div class="pb_text_input_kit">
|
19
|
+
<div class=" text_input_wrapper">
|
20
|
+
<input class="text_input cursor_pointer" id="upload-test" type="file" classname="cursor_pointer">
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= content_tag("div",
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id) do %>
|
6
|
+
<%= pb_rails("form_group", props: {cursor: "pointer", full_width: object.full_width}) do %>
|
7
|
+
<label for="upload-<%= object.id %>" class="pb_button_kit_secondary_inline_enabled"><%= "#{object.label}" %></label>
|
8
|
+
<%= pb_rails("text_input", props: {
|
9
|
+
type: "file",
|
10
|
+
input_options: {
|
11
|
+
id: "upload-#{object.id}",
|
12
|
+
classname: "cursor_pointer",
|
13
|
+
}.merge(object.input_options)
|
14
|
+
}) %>
|
15
|
+
<% end %>
|
16
|
+
</label>
|
17
|
+
<% end %>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Playbook
|
4
|
+
module PbFileUpload
|
5
|
+
class FileUpload < Playbook::KitBase
|
6
|
+
prop :accept, type: Playbook::Props::String,
|
7
|
+
default: ""
|
8
|
+
|
9
|
+
prop :files, type: Playbook::Props::Array,
|
10
|
+
default: []
|
11
|
+
|
12
|
+
prop :label, type: Playbook::Props::String,
|
13
|
+
default: "Upload File"
|
14
|
+
|
15
|
+
prop :placeholder, type: Playbook::Props::String,
|
16
|
+
default: "No file"
|
17
|
+
|
18
|
+
prop :full_width, type: Playbook::Props::Boolean,
|
19
|
+
default: false
|
20
|
+
|
21
|
+
prop :input_options, type: Playbook::Props::Hash,
|
22
|
+
default: {}
|
23
|
+
|
24
|
+
def classname
|
25
|
+
file_upload_class = generate_classname("pb_file_upload_kit")
|
26
|
+
file_upload_class + full_width_class
|
27
|
+
end
|
28
|
+
|
29
|
+
def full_width_class
|
30
|
+
full_width ? " full_width" : ""
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.
|
4
|
+
version: 13.1.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: 2023-08-
|
12
|
+
date: 2023-08-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -936,13 +936,19 @@ files:
|
|
936
936
|
- app/pb_kits/playbook/pb_file_upload/_file_upload.tsx
|
937
937
|
- app/pb_kits/playbook/pb_file_upload/docs/_description.md
|
938
938
|
- app/pb_kits/playbook/pb_file_upload/docs/_file_upload_accept.jsx
|
939
|
+
- app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom.html.erb
|
940
|
+
- app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom.md
|
939
941
|
- app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_description.jsx
|
940
942
|
- app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_description.md
|
941
943
|
- app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
|
944
|
+
- app/pb_kits/playbook/pb_file_upload/docs/_file_upload_default.html.erb
|
942
945
|
- app/pb_kits/playbook/pb_file_upload/docs/_file_upload_default.jsx
|
943
946
|
- app/pb_kits/playbook/pb_file_upload/docs/_file_upload_max_size.jsx
|
944
947
|
- app/pb_kits/playbook/pb_file_upload/docs/example.yml
|
945
948
|
- app/pb_kits/playbook/pb_file_upload/docs/index.js
|
949
|
+
- app/pb_kits/playbook/pb_file_upload/docs/test.html
|
950
|
+
- app/pb_kits/playbook/pb_file_upload/file_upload.html.erb
|
951
|
+
- app/pb_kits/playbook/pb_file_upload/file_upload.rb
|
946
952
|
- app/pb_kits/playbook/pb_file_upload/fileupload.test.js
|
947
953
|
- app/pb_kits/playbook/pb_filter/Filter/CurrentFilters.tsx
|
948
954
|
- app/pb_kits/playbook/pb_filter/Filter/FilterBackground.tsx
|
@@ -2600,7 +2606,7 @@ homepage: https://playbook.powerapp.cloud/
|
|
2600
2606
|
licenses:
|
2601
2607
|
- ISC
|
2602
2608
|
metadata: {}
|
2603
|
-
post_install_message:
|
2609
|
+
post_install_message:
|
2604
2610
|
rdoc_options: []
|
2605
2611
|
require_paths:
|
2606
2612
|
- lib
|
@@ -2611,12 +2617,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2611
2617
|
version: '0'
|
2612
2618
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2613
2619
|
requirements:
|
2614
|
-
- - "
|
2620
|
+
- - ">="
|
2615
2621
|
- !ruby/object:Gem::Version
|
2616
|
-
version:
|
2622
|
+
version: '0'
|
2617
2623
|
requirements: []
|
2618
2624
|
rubygems_version: 3.3.7
|
2619
|
-
signing_key:
|
2625
|
+
signing_key:
|
2620
2626
|
specification_version: 4
|
2621
2627
|
summary: Playbook Design System
|
2622
2628
|
test_files: []
|