playbook_ui 4.8.2 → 4.9.0.pre.alpha1
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/controllers/playbook/pages_controller.rb +8 -0
- data/app/helpers/playbook/pb_doc_helper.rb +8 -2
- data/app/pb_kits/playbook/_playbook.scss +1 -0
- data/app/pb_kits/playbook/data/menu.yml +2 -0
- data/app/pb_kits/playbook/index.js +1 -0
- data/app/pb_kits/playbook/packs/examples.js +2 -0
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +3 -0
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.jsx +60 -0
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.scss +6 -0
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_default.jsx +34 -0
- data/app/pb_kits/playbook/pb_file_upload/docs/example.yml +7 -0
- data/app/pb_kits/playbook/pb_file_upload/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_file_upload/file_upload.rb +11 -0
- data/app/pb_kits/playbook/pb_filter/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_filter/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_label_pill/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_label_pill/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_label_value/_label_value.jsx +31 -14
- data/app/pb_kits/playbook/pb_label_value/_label_value.scss +8 -0
- data/app/pb_kits/playbook/pb_label_value/docs/_label_value_dark.html.erb +24 -0
- data/app/pb_kits/playbook/pb_label_value/docs/_label_value_dark.jsx +35 -0
- data/app/pb_kits/playbook/pb_label_value/docs/_label_value_default.jsx +24 -1
- data/app/pb_kits/playbook/pb_label_value/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_label_value/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_label_value/label_value.rb +8 -1
- data/app/pb_kits/playbook/pb_online_status/docs/example.yml +1 -3
- data/app/pb_kits/playbook/pb_online_status/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_source/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_source/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_star_rating/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_star_rating/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_table/_table.jsx +3 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_responsive_table.html.erb +47 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_responsive_table.jsx +61 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +13 -14
- data/app/pb_kits/playbook/pb_time/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_time/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_timestamp/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_timestamp/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_title_detail/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_title_detail/docs/index.js +0 -1
- data/app/pb_kits/playbook/tokens/_colors.scss +2 -2
- data/app/views/layouts/playbook/application.html.slim +1 -0
- data/app/views/playbook/pages/utilities.html.slim +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +16 -14
- data/app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx +0 -9
- data/app/pb_kits/playbook/pb_label_pill/docs/_label_pill_default.jsx +0 -9
- data/app/pb_kits/playbook/pb_online_status/docs/_online_status_default.jsx +0 -9
- data/app/pb_kits/playbook/pb_source/docs/_source_default.jsx +0 -9
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.jsx +0 -9
- data/app/pb_kits/playbook/pb_time/docs/_time_default.jsx +0 -9
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx +0 -9
- data/app/pb_kits/playbook/pb_title_detail/docs/_title_detail_default.jsx +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4bf167d5819d52fd311f42011552c99f5751162188c78d6e5b0323d31fe2b8b3
|
|
4
|
+
data.tar.gz: 8f3f6b3c81345d2eac3f089996e8c2d47eff1501dd51bf2b1f99c0efe7d5a2c1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 925331069d01cf6923aff7df667e20a6f58d87f556d95ba7ec5eaff283c9f76dda103c535c0cc837828b940ef2f8fc57ca7c622e606a257bf7cd2a53d0ee228a
|
|
7
|
+
data.tar.gz: 6cff5497adc01543477c14687c409d132957a8f27f2ec5f87214eb83cc4547977da2fd39094960019e96bfb12a03147d1af8536237ac39a5a940c0d719efb395
|
|
@@ -6,6 +6,7 @@ require "yaml"
|
|
|
6
6
|
module Playbook
|
|
7
7
|
class PagesController < ApplicationController
|
|
8
8
|
before_action :set_kit, only: %i[kit_show_rails kit_show_react]
|
|
9
|
+
before_action :ensure_rails_kit_exists, only: %i[kit_show_rails]
|
|
9
10
|
before_action :set_category, only: %i[kit_category_show_rails kit_category_show_react]
|
|
10
11
|
|
|
11
12
|
def home; end
|
|
@@ -64,5 +65,12 @@ module Playbook
|
|
|
64
65
|
redirect_to root_path, flash: { error: "That kit does not exist" }
|
|
65
66
|
end
|
|
66
67
|
end
|
|
68
|
+
|
|
69
|
+
def ensure_rails_kit_exists
|
|
70
|
+
# TODO: unsure why we cannot simply use the helpers that are included in ApplicationController - fix this
|
|
71
|
+
erbfiles = File.join("**", "*.erb")
|
|
72
|
+
kit_files = Dir.glob(erbfiles, base: "#{Playbook::Engine.root}/app/pb_kits/playbook/pb_#{@kit}/docs").present?
|
|
73
|
+
redirect_to action: "kit_show_react" unless kit_files.present?
|
|
74
|
+
end
|
|
67
75
|
end
|
|
68
76
|
end
|
|
@@ -9,9 +9,11 @@ module Playbook
|
|
|
9
9
|
def has_kit_type?(kit, type)
|
|
10
10
|
type ||= "rails"
|
|
11
11
|
if type == "rails"
|
|
12
|
-
|
|
12
|
+
erbfiles = File.join("**", "*.erb")
|
|
13
|
+
Dir.glob(erbfiles, base: "#{kit_path(kit)}/docs").present?
|
|
13
14
|
elsif type == "react"
|
|
14
|
-
|
|
15
|
+
jsxfiles = File.join("**", "*.jsx")
|
|
16
|
+
Dir.glob(jsxfiles, base: "#{kit_path(kit)}/docs").present?
|
|
15
17
|
end
|
|
16
18
|
end
|
|
17
19
|
|
|
@@ -23,6 +25,10 @@ module Playbook
|
|
|
23
25
|
end
|
|
24
26
|
end
|
|
25
27
|
|
|
28
|
+
def kit_path(kit)
|
|
29
|
+
"#{Playbook::Engine.root}/app/pb_kits/playbook/pb_#{kit}"
|
|
30
|
+
end
|
|
31
|
+
|
|
26
32
|
def get_kit_description(kit)
|
|
27
33
|
filename = "#{Playbook::Engine.root}/app/pb_kits/playbook/pb_#{@kit}/docs/_description.md"
|
|
28
34
|
read_file(filename)
|
|
@@ -17,6 +17,7 @@ export DateRangeStacked from './pb_date_range_stacked/_date_range_stacked.jsx'
|
|
|
17
17
|
export DateStacked from './pb_date_stacked/_date_stacked.jsx'
|
|
18
18
|
export DateYearStacked from './pb_date_year_stacked/_date_year_stacked.jsx'
|
|
19
19
|
export DistributionBar from './pb_distribution_bar/_distribution_bar.jsx'
|
|
20
|
+
export FileUpload from './pb_file_upload/_file_upload.jsx'
|
|
20
21
|
export Filter from './pb_filter/_filter.jsx'
|
|
21
22
|
export FixedConfirmationToast from './pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx'
|
|
22
23
|
export Flex from './pb_flex/_flex.jsx'
|
|
@@ -31,6 +31,7 @@ import * as DateRangeStacked from 'pb_date_range_stacked/docs'
|
|
|
31
31
|
import * as DateStacked from 'pb_date_stacked/docs'
|
|
32
32
|
import * as DateYearStacked from 'pb_date_year_stacked/docs'
|
|
33
33
|
import * as DistributionBar from 'pb_distribution_bar/docs'
|
|
34
|
+
import * as FileUpload from 'pb_file_upload/docs'
|
|
34
35
|
import * as Filter from 'pb_filter/docs'
|
|
35
36
|
import * as FixedConfirmationToast from 'pb_fixed_confirmation_toast/docs'
|
|
36
37
|
import * as Flex from 'pb_flex/docs'
|
|
@@ -99,6 +100,7 @@ WebpackerReact.setup({
|
|
|
99
100
|
...DateStacked,
|
|
100
101
|
...DateYearStacked,
|
|
101
102
|
...DistributionBar,
|
|
103
|
+
...FileUpload,
|
|
102
104
|
...Filter,
|
|
103
105
|
...FixedConfirmationToast,
|
|
104
106
|
...Flex,
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* @flow */
|
|
2
|
+
|
|
3
|
+
import React, { useCallback } from 'react'
|
|
4
|
+
import { useDropzone } from 'react-dropzone'
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
buildCss,
|
|
8
|
+
noop,
|
|
9
|
+
} from '../utilities/props'
|
|
10
|
+
|
|
11
|
+
import type { Callback } from '../types.js'
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
Body,
|
|
15
|
+
Card,
|
|
16
|
+
} from '..'
|
|
17
|
+
|
|
18
|
+
type FileUploadProps = {
|
|
19
|
+
acceptedFiles?: FileList,
|
|
20
|
+
className?: String,
|
|
21
|
+
onFilesAccepted: Callback,
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const FileUpload = ({
|
|
25
|
+
acceptedFiles = [],
|
|
26
|
+
className,
|
|
27
|
+
onFilesAccepted = noop,
|
|
28
|
+
}: FileUploadProps) => {
|
|
29
|
+
const onDrop = useCallback((files) => {
|
|
30
|
+
onFilesAccepted(files)
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
const {
|
|
34
|
+
getRootProps,
|
|
35
|
+
getInputProps,
|
|
36
|
+
isDragActive,
|
|
37
|
+
} = useDropzone({ onDrop })
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<div
|
|
41
|
+
className={buildCss('pb_file_upload_kit', className)}
|
|
42
|
+
{...getRootProps()}
|
|
43
|
+
>
|
|
44
|
+
<Card>
|
|
45
|
+
<input {...getInputProps()} />
|
|
46
|
+
<Body
|
|
47
|
+
color="light"
|
|
48
|
+
>
|
|
49
|
+
<If condition={isDragActive}>
|
|
50
|
+
<p>{'Drop the files here ...'}</p>
|
|
51
|
+
<Else />
|
|
52
|
+
<p>{'Drag & drop some files here, or click to select files'}</p>
|
|
53
|
+
</If>
|
|
54
|
+
</Body>
|
|
55
|
+
</Card>
|
|
56
|
+
</div>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export default FileUpload
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
import {
|
|
3
|
+
FileUpload,
|
|
4
|
+
List,
|
|
5
|
+
ListItem,
|
|
6
|
+
} from '../..'
|
|
7
|
+
|
|
8
|
+
const AcceptedFilesList = ({files}: FileList) => (
|
|
9
|
+
<List>
|
|
10
|
+
{files.map(file => (
|
|
11
|
+
<ListItem key={file.name}>{file.name}</ListItem>
|
|
12
|
+
))}
|
|
13
|
+
</List>
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
const FileUploadDefault = () => {
|
|
17
|
+
const [filesToUpload, setFilesToUpload] = useState([])
|
|
18
|
+
|
|
19
|
+
const handleOnFilesAccepted = files => {
|
|
20
|
+
setFilesToUpload([...filesToUpload, ...files])
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<div>
|
|
25
|
+
<AcceptedFilesList files={filesToUpload} />
|
|
26
|
+
<FileUpload
|
|
27
|
+
acceptedFiles={filesToUpload}
|
|
28
|
+
onFilesAccepted={handleOnFilesAccepted}
|
|
29
|
+
/>
|
|
30
|
+
</div>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default FileUploadDefault
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as FileUploadDefault } from './_file_upload_default.jsx'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as FilterDefault } from './_filter_default.jsx'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as LabelPillDefault } from './_label_pill_default.jsx'
|
|
@@ -1,21 +1,38 @@
|
|
|
1
|
+
/* @flow */
|
|
2
|
+
|
|
1
3
|
import React from 'react'
|
|
2
|
-
import
|
|
4
|
+
import classnames from 'classnames'
|
|
5
|
+
import { Body, Caption } from '../'
|
|
3
6
|
|
|
4
|
-
|
|
5
|
-
className
|
|
6
|
-
|
|
7
|
+
type LabelValueProps = {
|
|
8
|
+
className?: String,
|
|
9
|
+
label: String,
|
|
10
|
+
value: String,
|
|
11
|
+
dark?: Boolean
|
|
7
12
|
}
|
|
8
13
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
const LabelValue = ({
|
|
15
|
+
className,
|
|
16
|
+
label,
|
|
17
|
+
value,
|
|
18
|
+
dark = false,
|
|
19
|
+
}: LabelValueProps) => {
|
|
20
|
+
const themeStyle = dark === true ? '_dark' : ''
|
|
21
|
+
const css = classnames([
|
|
22
|
+
'pb_label_value_kit' + themeStyle,
|
|
23
|
+
className,
|
|
24
|
+
])
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
return (
|
|
27
|
+
<div className={css}>
|
|
28
|
+
<Caption
|
|
29
|
+
text={label}
|
|
30
|
+
/>
|
|
31
|
+
<Body
|
|
32
|
+
text={value}
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
20
37
|
|
|
21
38
|
export default LabelValue
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<%= pb_rails("label_value", props: {
|
|
2
|
+
label: "Role",
|
|
3
|
+
value: "Administrator, Moderator",
|
|
4
|
+
dark: true
|
|
5
|
+
}) %>
|
|
6
|
+
|
|
7
|
+
<br>
|
|
8
|
+
|
|
9
|
+
<%= pb_rails("label_value", props: {
|
|
10
|
+
label: "Email",
|
|
11
|
+
value: "anna.black@powerhrg.com",
|
|
12
|
+
dark: true
|
|
13
|
+
}) %>
|
|
14
|
+
|
|
15
|
+
<br>
|
|
16
|
+
|
|
17
|
+
<%= pb_rails("label_value", props: {
|
|
18
|
+
label: "Bio",
|
|
19
|
+
value: "Proin pulvinar feugiat massa in luctus. Donec urna nulla,
|
|
20
|
+
elementum sit amet tincidunt nec, mattis nec urna. Cras viverra
|
|
21
|
+
lorem odio, id pretium dui interdum ut. Nullam dignissim nisl vitae
|
|
22
|
+
orci vehicula condimentum.",
|
|
23
|
+
dark: true
|
|
24
|
+
}) %>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { LabelValue } from '../../'
|
|
3
|
+
|
|
4
|
+
const LabelValueDark = () => {
|
|
5
|
+
return (
|
|
6
|
+
<div>
|
|
7
|
+
<LabelValue
|
|
8
|
+
dark
|
|
9
|
+
label="Role"
|
|
10
|
+
value="Administrator, Moderator"
|
|
11
|
+
/>
|
|
12
|
+
|
|
13
|
+
<br />
|
|
14
|
+
|
|
15
|
+
<LabelValue
|
|
16
|
+
dark
|
|
17
|
+
label="Email"
|
|
18
|
+
value="anna.black@powerhrg.com"
|
|
19
|
+
/>
|
|
20
|
+
|
|
21
|
+
<br />
|
|
22
|
+
|
|
23
|
+
<LabelValue
|
|
24
|
+
dark
|
|
25
|
+
label="Bio"
|
|
26
|
+
value="Proin pulvinar feugiat massa in luctus. Donec urna nulla,
|
|
27
|
+
elementum sit amet tincidunt nec, mattis nec urna. Cras viverra
|
|
28
|
+
lorem odio, id pretium dui interdum ut. Nullam dignissim nisl vitae
|
|
29
|
+
orci vehicula condimentum"
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default LabelValueDark
|
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
import { LabelValue } from '../../'
|
|
2
3
|
|
|
3
4
|
const LabelValueDefault = () => {
|
|
4
5
|
return (
|
|
5
|
-
<
|
|
6
|
+
<div>
|
|
7
|
+
<LabelValue
|
|
8
|
+
label="Role"
|
|
9
|
+
value="Administrator, Moderator"
|
|
10
|
+
/>
|
|
11
|
+
|
|
12
|
+
<br />
|
|
13
|
+
|
|
14
|
+
<LabelValue
|
|
15
|
+
label="Email"
|
|
16
|
+
value="anna.black@powerhrg.com"
|
|
17
|
+
/>
|
|
18
|
+
|
|
19
|
+
<br />
|
|
20
|
+
|
|
21
|
+
<LabelValue
|
|
22
|
+
label="Bio"
|
|
23
|
+
value="Proin pulvinar feugiat massa in luctus. Donec urna nulla,
|
|
24
|
+
elementum sit amet tincidunt nec, mattis nec urna. Cras viverra
|
|
25
|
+
lorem odio, id pretium dui interdum ut. Nullam dignissim nisl vitae
|
|
26
|
+
orci vehicula condimentum"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
6
29
|
)
|
|
7
30
|
}
|
|
8
31
|
|
|
@@ -9,9 +9,16 @@ module Playbook
|
|
|
9
9
|
|
|
10
10
|
prop :label, required: true
|
|
11
11
|
prop :value, required: true
|
|
12
|
+
prop :dark, type: Playbook::Props::Boolean, default: false
|
|
12
13
|
|
|
13
14
|
def classname
|
|
14
|
-
generate_classname("pb_label_value_kit")
|
|
15
|
+
generate_classname("pb_label_value_kit", dark_class)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
private
|
|
19
|
+
|
|
20
|
+
def dark_class
|
|
21
|
+
dark ? "dark" : nil
|
|
15
22
|
end
|
|
16
23
|
end
|
|
17
24
|
end
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as OnlineStatusDefault } from './_online_status_default.jsx'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as SourceDefault } from './_source_default.jsx'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as StarRatingDefault } from './_star_rating_default.jsx'
|
|
@@ -12,6 +12,7 @@ type TableProps = {
|
|
|
12
12
|
// @deprecated disable_hover since version 3.2.0, please use `disableHover`
|
|
13
13
|
disable_hover: boolean, // eslint-disable-line camelcase
|
|
14
14
|
disableHover: boolean,
|
|
15
|
+
responsive: "collapse" | "scroll" | "none",
|
|
15
16
|
// @deprecated single_line since version 3.2.0, please use `singleLine`
|
|
16
17
|
single_line: boolean, // eslint-disable-line camelcase
|
|
17
18
|
singleLine: boolean,
|
|
@@ -26,6 +27,7 @@ const Table = ({
|
|
|
26
27
|
dataTable = false,
|
|
27
28
|
disable_hover = false, // eslint-disable-line camelcase
|
|
28
29
|
disableHover = false,
|
|
30
|
+
responsive = 'collapse',
|
|
29
31
|
single_line = false, // eslint-disable-line camelcase
|
|
30
32
|
singleLine = false,
|
|
31
33
|
size = 'sm',
|
|
@@ -33,7 +35,7 @@ const Table = ({
|
|
|
33
35
|
disableHover = disableHover || disable_hover // eslint-disable-line camelcase
|
|
34
36
|
singleLine = singleLine || single_line // eslint-disable-line camelcase
|
|
35
37
|
|
|
36
|
-
const classes = classnames(className, 'pb_table', `table-${size}`, {
|
|
38
|
+
const classes = classnames(className, 'pb_table', `table-${size}`, `table-responsive-${responsive}`, {
|
|
37
39
|
'table-card': container,
|
|
38
40
|
'table-dark': dark,
|
|
39
41
|
'data_table': dataTable,
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<%= pb_rails("title", props: { size: 4, text: "Default" }) %>
|
|
2
|
+
|
|
3
|
+
<%= pb_rails("table", props: { responsive: "collapse" }) do %>
|
|
4
|
+
<thead>
|
|
5
|
+
<tr>
|
|
6
|
+
<th>Column 1</th>
|
|
7
|
+
<th>Column 2</th>
|
|
8
|
+
<th>Column 3</th>
|
|
9
|
+
<th>Column 4</th>
|
|
10
|
+
<th>Column 5</th>
|
|
11
|
+
</tr>
|
|
12
|
+
</thead>
|
|
13
|
+
<tbody>
|
|
14
|
+
<tr>
|
|
15
|
+
<td>Value 1</td>
|
|
16
|
+
<td>Value 2</td>
|
|
17
|
+
<td>Value 3</td>
|
|
18
|
+
<td>Value 4</td>
|
|
19
|
+
<td>Value 5</td>
|
|
20
|
+
</tr>
|
|
21
|
+
</tbody>
|
|
22
|
+
<% end %>
|
|
23
|
+
|
|
24
|
+
<br>
|
|
25
|
+
|
|
26
|
+
<%= pb_rails("title", props: { size: 4, text: "Responsive Off" }) %>
|
|
27
|
+
|
|
28
|
+
<%= pb_rails("table", props: { responsive: "none" }) do %>
|
|
29
|
+
<thead>
|
|
30
|
+
<tr>
|
|
31
|
+
<th>Column 1</th>
|
|
32
|
+
<th>Column 2</th>
|
|
33
|
+
<th>Column 3</th>
|
|
34
|
+
<th>Column 4</th>
|
|
35
|
+
<th>Column 5</th>
|
|
36
|
+
</tr>
|
|
37
|
+
</thead>
|
|
38
|
+
<tbody>
|
|
39
|
+
<tr>
|
|
40
|
+
<td>Value 1</td>
|
|
41
|
+
<td>Value 2</td>
|
|
42
|
+
<td>Value 3</td>
|
|
43
|
+
<td>Value 4</td>
|
|
44
|
+
<td>Value 5</td>
|
|
45
|
+
</tr>
|
|
46
|
+
</tbody>
|
|
47
|
+
<% end %>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { Table, Title } from '../../'
|
|
3
|
+
|
|
4
|
+
const TableResponsiveTable = () => {
|
|
5
|
+
return (
|
|
6
|
+
<div>
|
|
7
|
+
<Title
|
|
8
|
+
size={4}
|
|
9
|
+
text="Default"
|
|
10
|
+
/>
|
|
11
|
+
<Table>
|
|
12
|
+
<thead>
|
|
13
|
+
<tr>
|
|
14
|
+
<th>{'Column 1'}</th>
|
|
15
|
+
<th>{'Column 2'}</th>
|
|
16
|
+
<th>{'Column 3'}</th>
|
|
17
|
+
<th>{'Column 4'}</th>
|
|
18
|
+
<th>{'Column 5'}</th>
|
|
19
|
+
</tr>
|
|
20
|
+
</thead>
|
|
21
|
+
<tbody>
|
|
22
|
+
<tr>
|
|
23
|
+
<td>{'Value 1'}</td>
|
|
24
|
+
<td>{'Value 2'}</td>
|
|
25
|
+
<td>{'Value 3'}</td>
|
|
26
|
+
<td>{'Value 4'}</td>
|
|
27
|
+
<td>{'Value 5'}</td>
|
|
28
|
+
</tr>
|
|
29
|
+
</tbody>
|
|
30
|
+
</Table>
|
|
31
|
+
<br />
|
|
32
|
+
<br />
|
|
33
|
+
<Title
|
|
34
|
+
size={4}
|
|
35
|
+
text="Default"
|
|
36
|
+
/>
|
|
37
|
+
<Table responsive="none">
|
|
38
|
+
<thead>
|
|
39
|
+
<tr>
|
|
40
|
+
<th>{'Column 1'}</th>
|
|
41
|
+
<th>{'Column 2'}</th>
|
|
42
|
+
<th>{'Column 3'}</th>
|
|
43
|
+
<th>{'Column 4'}</th>
|
|
44
|
+
<th>{'Column 5'}</th>
|
|
45
|
+
</tr>
|
|
46
|
+
</thead>
|
|
47
|
+
<tbody>
|
|
48
|
+
<tr>
|
|
49
|
+
<td>{'Value 1'}</td>
|
|
50
|
+
<td>{'Value 2'}</td>
|
|
51
|
+
<td>{'Value 3'}</td>
|
|
52
|
+
<td>{'Value 4'}</td>
|
|
53
|
+
<td>{'Value 5'}</td>
|
|
54
|
+
</tr>
|
|
55
|
+
</tbody>
|
|
56
|
+
</Table>
|
|
57
|
+
</div>
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export default TableResponsiveTable
|
|
@@ -8,6 +8,7 @@ examples:
|
|
|
8
8
|
- table_multiline: Multi-line
|
|
9
9
|
- table_single_line: Force Single Line
|
|
10
10
|
- table_data_table: Data Table
|
|
11
|
+
- table_responsive_table: Responsive Tables
|
|
11
12
|
- table_dark: Table Dark
|
|
12
13
|
- table_container_dark: Table Container Off Dark
|
|
13
14
|
react:
|
|
@@ -19,5 +20,6 @@ examples:
|
|
|
19
20
|
- table_multiline: Multi-line
|
|
20
21
|
- table_single_line: Force Single Line
|
|
21
22
|
- table_data_table: Data Table
|
|
23
|
+
- table_responsive_table: Responsive Tables
|
|
22
24
|
- table_dark: Table Dark
|
|
23
25
|
- table_container_dark: Table Container Off Dark
|
|
@@ -3,6 +3,7 @@ export { default as TableMd } from './_table_md.jsx'
|
|
|
3
3
|
export { default as TableLg } from './_table_lg.jsx'
|
|
4
4
|
export { default as TableContainer } from './_table_container.jsx'
|
|
5
5
|
export { default as TableDataTable } from './_table_data_table.jsx'
|
|
6
|
+
export { default as TableResponsiveTable } from './_table_responsive_table.jsx'
|
|
6
7
|
export { default as TableDark } from './_table_dark.jsx'
|
|
7
8
|
export { default as TableContainerDark } from './_table_container_dark.jsx'
|
|
8
9
|
export { default as TableDisableHover } from './_table_disable_hover.jsx'
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
@media only screen and (max-width: $screen-xs-max) {
|
|
5
5
|
[class^=pb_table] {
|
|
6
|
-
&.table-sm,
|
|
7
|
-
&.table-md,
|
|
8
|
-
&.table-lg {
|
|
6
|
+
&.table-sm.table-responsive-collapse,
|
|
7
|
+
&.table-md.table-responsive-collapse,
|
|
8
|
+
&.table-lg.table-responsive-collapse {
|
|
9
9
|
width: 100%;
|
|
10
10
|
background: none !important;
|
|
11
11
|
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
border-bottom-width: 0 !important;
|
|
32
32
|
border-color: $border_light !important;
|
|
33
33
|
min-height: 2.2em;
|
|
34
|
-
// padding-left: 34%;
|
|
35
34
|
position: relative;
|
|
36
35
|
text-align:left;
|
|
37
36
|
white-space: normal;
|
|
@@ -99,16 +98,16 @@
|
|
|
99
98
|
}
|
|
100
99
|
}
|
|
101
100
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
101
|
+
// reset the first and last to normalize
|
|
102
|
+
@each $name, $value in $cell-pad-list {
|
|
103
|
+
&.#{$name} {
|
|
104
|
+
tbody {
|
|
105
|
+
tr {
|
|
106
|
+
td {
|
|
107
|
+
&:first-child,
|
|
108
|
+
&:last-child {
|
|
109
|
+
padding: $value $cell-gutter !important;
|
|
110
|
+
}
|
|
112
111
|
}
|
|
113
112
|
}
|
|
114
113
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as TimeDefault } from './_time_default.jsx'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as TimestampDefault } from './_timestamp_default.jsx'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as TitleDetailDefault } from './_title_detail_default.jsx'
|
|
@@ -178,14 +178,14 @@ $windows: $royal;
|
|
|
178
178
|
$siding: $yellow;
|
|
179
179
|
$doors: $red;
|
|
180
180
|
$solar: $green;
|
|
181
|
-
$
|
|
181
|
+
$roofing: $teal;
|
|
182
182
|
$gutters: $purple;
|
|
183
183
|
$product_colors: (
|
|
184
184
|
windows: $windows,
|
|
185
185
|
siding: $siding,
|
|
186
186
|
doors: $doors,
|
|
187
187
|
solar: $solar,
|
|
188
|
-
|
|
188
|
+
roofing: $roofing,
|
|
189
189
|
gutters: $gutters
|
|
190
190
|
);
|
|
191
191
|
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: playbook_ui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.9.0.pre.alpha1
|
|
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: 2020-
|
|
12
|
+
date: 2020-04-02 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: actionpack
|
|
@@ -175,14 +175,14 @@ dependencies:
|
|
|
175
175
|
requirements:
|
|
176
176
|
- - '='
|
|
177
177
|
- !ruby/object:Gem::Version
|
|
178
|
-
version: 4.
|
|
178
|
+
version: 4.2.2
|
|
179
179
|
type: :runtime
|
|
180
180
|
prerelease: false
|
|
181
181
|
version_requirements: !ruby/object:Gem::Requirement
|
|
182
182
|
requirements:
|
|
183
183
|
- - '='
|
|
184
184
|
- !ruby/object:Gem::Version
|
|
185
|
-
version: 4.
|
|
185
|
+
version: 4.2.2
|
|
186
186
|
- !ruby/object:Gem::Dependency
|
|
187
187
|
name: webpacker-react
|
|
188
188
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -757,11 +757,16 @@ files:
|
|
|
757
757
|
- app/pb_kits/playbook/pb_distribution_bar/docs/index.js
|
|
758
758
|
- app/pb_kits/playbook/pb_enhanced_element/element_observer.js
|
|
759
759
|
- app/pb_kits/playbook/pb_enhanced_element/index.js
|
|
760
|
+
- app/pb_kits/playbook/pb_file_upload/_file_upload.jsx
|
|
761
|
+
- app/pb_kits/playbook/pb_file_upload/_file_upload.scss
|
|
762
|
+
- app/pb_kits/playbook/pb_file_upload/docs/_file_upload_default.jsx
|
|
763
|
+
- app/pb_kits/playbook/pb_file_upload/docs/example.yml
|
|
764
|
+
- app/pb_kits/playbook/pb_file_upload/docs/index.js
|
|
765
|
+
- app/pb_kits/playbook/pb_file_upload/file_upload.rb
|
|
760
766
|
- app/pb_kits/playbook/pb_filter/_filter.html.erb
|
|
761
767
|
- app/pb_kits/playbook/pb_filter/_filter.jsx
|
|
762
768
|
- app/pb_kits/playbook/pb_filter/_filter.scss
|
|
763
769
|
- app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb
|
|
764
|
-
- app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx
|
|
765
770
|
- app/pb_kits/playbook/pb_filter/docs/_filter_no_background.html.erb
|
|
766
771
|
- app/pb_kits/playbook/pb_filter/docs/_filter_single.html.erb
|
|
767
772
|
- app/pb_kits/playbook/pb_filter/docs/example.yml
|
|
@@ -952,7 +957,6 @@ files:
|
|
|
952
957
|
- app/pb_kits/playbook/pb_label_pill/docs/_description.md
|
|
953
958
|
- app/pb_kits/playbook/pb_label_pill/docs/_footer.md
|
|
954
959
|
- app/pb_kits/playbook/pb_label_pill/docs/_label_pill_default.html.erb
|
|
955
|
-
- app/pb_kits/playbook/pb_label_pill/docs/_label_pill_default.jsx
|
|
956
960
|
- app/pb_kits/playbook/pb_label_pill/docs/_label_pill_default.md
|
|
957
961
|
- app/pb_kits/playbook/pb_label_pill/docs/example.yml
|
|
958
962
|
- app/pb_kits/playbook/pb_label_pill/docs/index.js
|
|
@@ -962,6 +966,8 @@ files:
|
|
|
962
966
|
- app/pb_kits/playbook/pb_label_value/_label_value.scss
|
|
963
967
|
- app/pb_kits/playbook/pb_label_value/docs/_description.md
|
|
964
968
|
- app/pb_kits/playbook/pb_label_value/docs/_footer.md
|
|
969
|
+
- app/pb_kits/playbook/pb_label_value/docs/_label_value_dark.html.erb
|
|
970
|
+
- app/pb_kits/playbook/pb_label_value/docs/_label_value_dark.jsx
|
|
965
971
|
- app/pb_kits/playbook/pb_label_value/docs/_label_value_default.html.erb
|
|
966
972
|
- app/pb_kits/playbook/pb_label_value/docs/_label_value_default.jsx
|
|
967
973
|
- app/pb_kits/playbook/pb_label_value/docs/_label_value_default.md
|
|
@@ -1116,7 +1122,6 @@ files:
|
|
|
1116
1122
|
- app/pb_kits/playbook/pb_online_status/_online_status_mixins.scss
|
|
1117
1123
|
- app/pb_kits/playbook/pb_online_status/docs/_description.md
|
|
1118
1124
|
- app/pb_kits/playbook/pb_online_status/docs/_online_status_default.html.erb
|
|
1119
|
-
- app/pb_kits/playbook/pb_online_status/docs/_online_status_default.jsx
|
|
1120
1125
|
- app/pb_kits/playbook/pb_online_status/docs/example.yml
|
|
1121
1126
|
- app/pb_kits/playbook/pb_online_status/docs/index.js
|
|
1122
1127
|
- app/pb_kits/playbook/pb_online_status/online_status.rb
|
|
@@ -1294,7 +1299,6 @@ files:
|
|
|
1294
1299
|
- app/pb_kits/playbook/pb_source/_source.scss
|
|
1295
1300
|
- app/pb_kits/playbook/pb_source/docs/_description.md
|
|
1296
1301
|
- app/pb_kits/playbook/pb_source/docs/_source_default.html.erb
|
|
1297
|
-
- app/pb_kits/playbook/pb_source/docs/_source_default.jsx
|
|
1298
1302
|
- app/pb_kits/playbook/pb_source/docs/_source_noicon.html.erb
|
|
1299
1303
|
- app/pb_kits/playbook/pb_source/docs/_source_types.html.erb
|
|
1300
1304
|
- app/pb_kits/playbook/pb_source/docs/example.yml
|
|
@@ -1305,7 +1309,6 @@ files:
|
|
|
1305
1309
|
- app/pb_kits/playbook/pb_star_rating/_star_rating.scss
|
|
1306
1310
|
- app/pb_kits/playbook/pb_star_rating/docs/_description.md
|
|
1307
1311
|
- app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.html.erb
|
|
1308
|
-
- app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.jsx
|
|
1309
1312
|
- app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.html.erb
|
|
1310
1313
|
- app/pb_kits/playbook/pb_star_rating/docs/example.yml
|
|
1311
1314
|
- app/pb_kits/playbook/pb_star_rating/docs/index.js
|
|
@@ -1354,6 +1357,8 @@ files:
|
|
|
1354
1357
|
- app/pb_kits/playbook/pb_table/docs/_table_md.md
|
|
1355
1358
|
- app/pb_kits/playbook/pb_table/docs/_table_multiline.html.erb
|
|
1356
1359
|
- app/pb_kits/playbook/pb_table/docs/_table_multiline.jsx
|
|
1360
|
+
- app/pb_kits/playbook/pb_table/docs/_table_responsive_table.html.erb
|
|
1361
|
+
- app/pb_kits/playbook/pb_table/docs/_table_responsive_table.jsx
|
|
1357
1362
|
- app/pb_kits/playbook/pb_table/docs/_table_single_line.html.erb
|
|
1358
1363
|
- app/pb_kits/playbook/pb_table/docs/_table_single_line.jsx
|
|
1359
1364
|
- app/pb_kits/playbook/pb_table/docs/_table_sm.html.erb
|
|
@@ -1423,7 +1428,6 @@ files:
|
|
|
1423
1428
|
- app/pb_kits/playbook/pb_time/docs/_description.md
|
|
1424
1429
|
- app/pb_kits/playbook/pb_time/docs/_footer.md
|
|
1425
1430
|
- app/pb_kits/playbook/pb_time/docs/_time_default.html.erb
|
|
1426
|
-
- app/pb_kits/playbook/pb_time/docs/_time_default.jsx
|
|
1427
1431
|
- app/pb_kits/playbook/pb_time/docs/_time_default.md
|
|
1428
1432
|
- app/pb_kits/playbook/pb_time/docs/_time_timestamp.html.erb
|
|
1429
1433
|
- app/pb_kits/playbook/pb_time/docs/example.yml
|
|
@@ -1437,7 +1441,6 @@ files:
|
|
|
1437
1441
|
- app/pb_kits/playbook/pb_timestamp/docs/_footer.md
|
|
1438
1442
|
- app/pb_kits/playbook/pb_timestamp/docs/_time_stamp_default.md
|
|
1439
1443
|
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.html.erb
|
|
1440
|
-
- app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
|
|
1441
1444
|
- app/pb_kits/playbook/pb_timestamp/docs/example.yml
|
|
1442
1445
|
- app/pb_kits/playbook/pb_timestamp/docs/index.js
|
|
1443
1446
|
- app/pb_kits/playbook/pb_timestamp/timestamp.rb
|
|
@@ -1471,7 +1474,6 @@ files:
|
|
|
1471
1474
|
- app/pb_kits/playbook/pb_title_detail/docs/_description.md
|
|
1472
1475
|
- app/pb_kits/playbook/pb_title_detail/docs/_footer.md
|
|
1473
1476
|
- app/pb_kits/playbook/pb_title_detail/docs/_title_detail_default.html.erb
|
|
1474
|
-
- app/pb_kits/playbook/pb_title_detail/docs/_title_detail_default.jsx
|
|
1475
1477
|
- app/pb_kits/playbook/pb_title_detail/docs/_title_detail_default.md
|
|
1476
1478
|
- app/pb_kits/playbook/pb_title_detail/docs/example.yml
|
|
1477
1479
|
- app/pb_kits/playbook/pb_title_detail/docs/index.js
|
|
@@ -1638,9 +1640,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
1638
1640
|
version: '0'
|
|
1639
1641
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1640
1642
|
requirements:
|
|
1641
|
-
- - "
|
|
1643
|
+
- - ">"
|
|
1642
1644
|
- !ruby/object:Gem::Version
|
|
1643
|
-
version:
|
|
1645
|
+
version: 1.3.1
|
|
1644
1646
|
requirements: []
|
|
1645
1647
|
rubyforge_project:
|
|
1646
1648
|
rubygems_version: 2.7.3
|