playbook_ui 14.12.0.pre.alpha.PBNTR834advtablemaxHeightstickyheader5932 → 14.12.0.pre.alpha.PBNTR8335887
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_advanced_table/_advanced_table.scss +1 -52
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.scss +1 -2
- data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +3 -3
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +11 -7
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.html.erb +11 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.jsx +22 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_rails.md +1 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_react.md +1 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +11 -2
- data/app/pb_kits/playbook/pb_link/_link.tsx +0 -18
- data/app/pb_kits/playbook/pb_link/docs/example.yml +3 -5
- data/app/pb_kits/playbook/pb_link/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_link/link.html.erb +1 -1
- data/app/pb_kits/playbook/pb_link/link.rb +0 -6
- data/app/pb_kits/playbook/pb_link/link.test.jsx +0 -30
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tooltip.html.erb +6 -6
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_tooltip/index.js +27 -45
- data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +1 -5
- data/dist/chunks/{_typeahead-CkemExmL.js → _typeahead-W0hatdPs.js} +1 -1
- data/dist/chunks/_weekday_stacked-Be4uzzgn.js +45 -0
- data/dist/chunks/{lib-DjpLC8uO.js → lib-kMuhBuU7.js} +1 -1
- data/dist/chunks/{pb_form_validation-S56UaHZl.js → pb_form_validation-DBJ0wZuS.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +2 -2
- data/dist/playbook-doc.js +1 -1
- 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/version.rb +1 -1
- metadata +10 -15
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx +0 -55
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +0 -3
- data/app/pb_kits/playbook/pb_copy_button/copy_button.html.erb +0 -15
- data/app/pb_kits/playbook/pb_copy_button/copy_button.rb +0 -28
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +0 -2
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +0 -5
- data/app/pb_kits/playbook/pb_copy_button/index.js +0 -47
- data/app/pb_kits/playbook/pb_link/docs/_link_target.html.erb +0 -15
- data/app/pb_kits/playbook/pb_link/docs/_link_target.jsx +0 -29
- data/dist/chunks/_weekday_stacked-DiNLeUtf.js +0 -45
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: 14.12.0.pre.alpha.
|
4
|
+
version: 14.12.0.pre.alpha.PBNTR8335887
|
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: 2025-02-
|
12
|
+
date: 2025-02-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -333,8 +333,6 @@ files:
|
|
333
333
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx
|
334
334
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md
|
335
335
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md
|
336
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx
|
337
|
-
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md
|
338
336
|
- app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading.js
|
339
337
|
- app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data.json
|
340
338
|
- app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_no_subrows.json
|
@@ -803,17 +801,12 @@ files:
|
|
803
801
|
- app/pb_kits/playbook/pb_contact/docs/index.js
|
804
802
|
- app/pb_kits/playbook/pb_copy_button/_copy_button.scss
|
805
803
|
- app/pb_kits/playbook/pb_copy_button/_copy_button.tsx
|
806
|
-
- app/pb_kits/playbook/pb_copy_button/copy_button.html.erb
|
807
|
-
- app/pb_kits/playbook/pb_copy_button/copy_button.rb
|
808
804
|
- app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx
|
809
|
-
- app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb
|
810
805
|
- app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx
|
811
|
-
- app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb
|
812
806
|
- app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx
|
813
807
|
- app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.md
|
814
808
|
- app/pb_kits/playbook/pb_copy_button/docs/example.yml
|
815
809
|
- app/pb_kits/playbook/pb_copy_button/docs/index.js
|
816
|
-
- app/pb_kits/playbook/pb_copy_button/index.js
|
817
810
|
- app/pb_kits/playbook/pb_currency/_currency.scss
|
818
811
|
- app/pb_kits/playbook/pb_currency/_currency.tsx
|
819
812
|
- app/pb_kits/playbook/pb_currency/currency.html.erb
|
@@ -1562,6 +1555,10 @@ files:
|
|
1562
1555
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.jsx
|
1563
1556
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.md
|
1564
1557
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis_swift.md
|
1558
|
+
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.html.erb
|
1559
|
+
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.jsx
|
1560
|
+
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_rails.md
|
1561
|
+
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_react.md
|
1565
1562
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.html.erb
|
1566
1563
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.jsx
|
1567
1564
|
- app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link.md
|
@@ -1846,8 +1843,6 @@ files:
|
|
1846
1843
|
- app/pb_kits/playbook/pb_link/docs/_link_icon.jsx
|
1847
1844
|
- app/pb_kits/playbook/pb_link/docs/_link_tag.html.erb
|
1848
1845
|
- app/pb_kits/playbook/pb_link/docs/_link_tag.jsx
|
1849
|
-
- app/pb_kits/playbook/pb_link/docs/_link_target.html.erb
|
1850
|
-
- app/pb_kits/playbook/pb_link/docs/_link_target.jsx
|
1851
1846
|
- app/pb_kits/playbook/pb_link/docs/_link_underline.html.erb
|
1852
1847
|
- app/pb_kits/playbook/pb_link/docs/_link_underline.jsx
|
1853
1848
|
- app/pb_kits/playbook/pb_link/docs/example.yml
|
@@ -3324,11 +3319,11 @@ files:
|
|
3324
3319
|
- app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
|
3325
3320
|
- app/pb_kits/playbook/utilities/text.ts
|
3326
3321
|
- app/pb_kits/playbook/utilities/validEmojiChecker.ts
|
3327
|
-
- dist/chunks/_typeahead-
|
3328
|
-
- dist/chunks/_weekday_stacked-
|
3322
|
+
- dist/chunks/_typeahead-W0hatdPs.js
|
3323
|
+
- dist/chunks/_weekday_stacked-Be4uzzgn.js
|
3329
3324
|
- dist/chunks/lazysizes-B7xYodB-.js
|
3330
|
-
- dist/chunks/lib-
|
3331
|
-
- dist/chunks/pb_form_validation-
|
3325
|
+
- dist/chunks/lib-kMuhBuU7.js
|
3326
|
+
- dist/chunks/pb_form_validation-DBJ0wZuS.js
|
3332
3327
|
- dist/chunks/vendor.js
|
3333
3328
|
- dist/menu.yml
|
3334
3329
|
- dist/playbook-doc.js
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
import React from "react"
|
2
|
-
import { AdvancedTable } from "playbook-ui"
|
3
|
-
import MOCK_DATA from "./advanced_table_mock_data.json"
|
4
|
-
|
5
|
-
const AdvancedTableTablePropsStickyHeader = (props) => {
|
6
|
-
const columnDefinitions = [
|
7
|
-
{
|
8
|
-
accessor: "year",
|
9
|
-
label: "Year",
|
10
|
-
cellAccessors: ["quarter", "month", "day"],
|
11
|
-
},
|
12
|
-
{
|
13
|
-
accessor: "newEnrollments",
|
14
|
-
label: "New Enrollments",
|
15
|
-
},
|
16
|
-
{
|
17
|
-
accessor: "scheduledMeetings",
|
18
|
-
label: "Scheduled Meetings",
|
19
|
-
},
|
20
|
-
{
|
21
|
-
accessor: "attendanceRate",
|
22
|
-
label: "Attendance Rate",
|
23
|
-
},
|
24
|
-
{
|
25
|
-
accessor: "completedClasses",
|
26
|
-
label: "Completed Classes",
|
27
|
-
},
|
28
|
-
{
|
29
|
-
accessor: "classCompletionRate",
|
30
|
-
label: "Class Completion Rate",
|
31
|
-
},
|
32
|
-
{
|
33
|
-
accessor: "graduatedStudents",
|
34
|
-
label: "Graduated Students",
|
35
|
-
},
|
36
|
-
]
|
37
|
-
|
38
|
-
const tableProps = {
|
39
|
-
sticky: true
|
40
|
-
}
|
41
|
-
|
42
|
-
return (
|
43
|
-
<div>
|
44
|
-
<AdvancedTable
|
45
|
-
columnDefinitions={columnDefinitions}
|
46
|
-
maxHeight="xs"
|
47
|
-
tableData={MOCK_DATA}
|
48
|
-
tableProps={tableProps}
|
49
|
-
{...props}
|
50
|
-
/>
|
51
|
-
</div>
|
52
|
-
)
|
53
|
-
}
|
54
|
-
|
55
|
-
export default AdvancedTableTablePropsStickyHeader
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md
DELETED
@@ -1,3 +0,0 @@
|
|
1
|
-
Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and giving the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop. This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
|
2
|
-
|
3
|
-
A sticky header on a nonresponsive table is demonstrated in the ["Table Props"](https://playbook.powerapp.cloud/kits/advanced_table/react#table-props) doc example above.
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<%= pb_content_tag do %>
|
2
|
-
<%= pb_rails("button", props: { icon: "copy" }) do %>
|
3
|
-
<%= object.text %>
|
4
|
-
<% end %>
|
5
|
-
<% if object.id %>
|
6
|
-
<%= pb_rails("tooltip", props: {
|
7
|
-
trigger_element_selector: "##{object.id}",
|
8
|
-
position: object.tooltip_position,
|
9
|
-
tooltip_id: "#{object.id}_tooltip",
|
10
|
-
trigger_method: "click"
|
11
|
-
}) do %>
|
12
|
-
<%= object.tooltip_text %>
|
13
|
-
<% end %>
|
14
|
-
<% end %>
|
15
|
-
<% end %>
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Playbook
|
4
|
-
module PbCopyButton
|
5
|
-
class CopyButton < ::Playbook::KitBase
|
6
|
-
prop :text
|
7
|
-
prop :tooltip_position,
|
8
|
-
type: Playbook::Props::Enum,
|
9
|
-
values: %w[top right bottom left],
|
10
|
-
default: "top"
|
11
|
-
prop :tooltip_text, type: Playbook::Props::String,
|
12
|
-
default: "Copied!"
|
13
|
-
prop :value
|
14
|
-
prop :from
|
15
|
-
|
16
|
-
def classname
|
17
|
-
generate_classname("pb_copy_button_kit")
|
18
|
-
end
|
19
|
-
|
20
|
-
def data
|
21
|
-
Hash(values[:data]).merge(
|
22
|
-
"copy-value": value,
|
23
|
-
"from": from
|
24
|
-
)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,2 +0,0 @@
|
|
1
|
-
<%= pb_rails("copy_button", props: { id: "default-copy-button", text: "Copy Text", value: "Playbook makes it easy to support bleeding edge, or legacy systems. Use Playbook’s 200+ components and end-to-end design language to create simple, intuitive and beautiful experiences with ease." } ) %>
|
2
|
-
<%= pb_rails("textarea", props: { margin_top: "xs", placeholder: "Copy and paste here" }) %>
|
@@ -1,5 +0,0 @@
|
|
1
|
-
<%= pb_rails("body", props: { id: "body", text: "Copy this body text!"}) %>
|
2
|
-
<%= pb_rails("copy_button", props: { text: "Copy Body text", from: "body", id: "copy-body-button" }) %>
|
3
|
-
<%= pb_rails("text_input", props: { margin_top: "xs", placeholder: "Copy and paste here" }) %>
|
4
|
-
<%= pb_rails("copy_button", props: { text: "Copy Text Input", from: "copy-input", id: "copy-input-button" }) %>
|
5
|
-
<%= pb_rails("text_input", props: { margin_top: "xs", id: "copy-input" , value: "Copy and paste here" }) %>
|
@@ -1,47 +0,0 @@
|
|
1
|
-
import PbEnhancedElement from "../pb_enhanced_element"
|
2
|
-
|
3
|
-
export default class PbCopyButton extends PbEnhancedElement {
|
4
|
-
static get selector() {
|
5
|
-
return '.pb_copy_button_kit'
|
6
|
-
}
|
7
|
-
|
8
|
-
connect() {
|
9
|
-
this.handleClick = this.handleClick.bind(this)
|
10
|
-
this.button = this.element.querySelector('button')
|
11
|
-
if (this.button) {
|
12
|
-
this.button.addEventListener('click', this.handleClick)
|
13
|
-
}
|
14
|
-
}
|
15
|
-
|
16
|
-
disconnect() {
|
17
|
-
if (this.button) {
|
18
|
-
this.button.removeEventListener('click', this.handleClick)
|
19
|
-
}
|
20
|
-
}
|
21
|
-
|
22
|
-
handleClick() {
|
23
|
-
const fromId = this.element.getAttribute('data-from')
|
24
|
-
if (fromId) {
|
25
|
-
const fromElement = document.querySelector(`#${fromId}`)
|
26
|
-
if (fromElement) {
|
27
|
-
let contentToCopy = ''
|
28
|
-
if (fromElement.tagName.toLowerCase() === 'input') {
|
29
|
-
contentToCopy = fromElement.value
|
30
|
-
} else {
|
31
|
-
contentToCopy = fromElement.innerText
|
32
|
-
}
|
33
|
-
navigator.clipboard.writeText(contentToCopy)
|
34
|
-
.catch(err => console.error('Failed to copy text', err))
|
35
|
-
return
|
36
|
-
}
|
37
|
-
}
|
38
|
-
|
39
|
-
const textToCopy = this.element.getAttribute('data-copy-value')
|
40
|
-
if (textToCopy) {
|
41
|
-
navigator.clipboard.writeText(textToCopy)
|
42
|
-
.catch(err => console.error('Failed to copy text', err))
|
43
|
-
} else {
|
44
|
-
console.warn('No data-copy-value attribute found or data-from element')
|
45
|
-
}
|
46
|
-
}
|
47
|
-
}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<div>
|
2
|
-
<%= pb_rails("link", props: {
|
3
|
-
href: "http://google.com",
|
4
|
-
target: "blank",
|
5
|
-
text: "Open In New Window"
|
6
|
-
}) %>
|
7
|
-
</div>
|
8
|
-
|
9
|
-
<div>
|
10
|
-
<%= pb_rails("link", props: {
|
11
|
-
href: "https://playbook.powerapp.cloud/",
|
12
|
-
target: "child",
|
13
|
-
text: "Open In Child Tab",
|
14
|
-
}) %>
|
15
|
-
</div>
|
@@ -1,29 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { Link } from 'playbook-ui'
|
3
|
-
|
4
|
-
const LinkTarget = (props) => (
|
5
|
-
<div>
|
6
|
-
<div>
|
7
|
-
<Link
|
8
|
-
aria={{ label: 'Link to Google in new window' }}
|
9
|
-
href="https://google.com"
|
10
|
-
tabIndex={0}
|
11
|
-
target='blank'
|
12
|
-
text="Open In New Window"
|
13
|
-
{...props}
|
14
|
-
/>
|
15
|
-
</div>
|
16
|
-
<div>
|
17
|
-
<Link
|
18
|
-
aria={{ label: 'Link to Playbook in a child tab' }}
|
19
|
-
href="https://playbook.powerapp.cloud/"
|
20
|
-
tabIndex={0}
|
21
|
-
target='child'
|
22
|
-
text="Open In Child Tab"
|
23
|
-
{...props}
|
24
|
-
/>
|
25
|
-
</div>
|
26
|
-
</div>
|
27
|
-
)
|
28
|
-
|
29
|
-
export default LinkTarget
|