playbook_ui 12.14.0 → 12.16.0.pre.alpha.tiptaptestingpart1528
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_avatar/_avatar.tsx +1 -1
- data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +1 -1
- data/app/pb_kits/playbook/pb_avatar/avatar.rb +4 -0
- data/app/pb_kits/playbook/pb_avatar/avatar.test.js +14 -0
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_default.html.erb +0 -1
- data/app/pb_kits/playbook/pb_background/_background.tsx +1 -1
- data/app/pb_kits/playbook/pb_background/background.rb +1 -1
- data/app/pb_kits/playbook/pb_badge/_badge.scss +1 -0
- data/app/pb_kits/playbook/pb_badge/_badge.tsx +1 -1
- data/app/pb_kits/playbook/pb_badge/badge.rb +5 -1
- data/app/pb_kits/playbook/pb_badge/badge.test.js +16 -1
- data/app/pb_kits/playbook/pb_body/_body_mixins.scss +3 -3
- data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +2 -2
- data/app/pb_kits/playbook/pb_card/_card.scss +13 -0
- data/app/pb_kits/playbook/pb_card/_card.tsx +3 -2
- data/app/pb_kits/playbook/pb_card/card_header.rb +9 -1
- data/app/pb_kits/playbook/pb_card/docs/_card_header.html.erb +11 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_header.jsx +169 -139
- data/app/pb_kits/playbook/pb_enhanced_element/index.ts +1 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +5 -5
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.html.erb +1 -1
- data/app/pb_kits/playbook/pb_nav/_item.tsx +6 -6
- data/app/pb_kits/playbook/pb_nav/_nav.tsx +2 -2
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +0 -5
- data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +0 -4
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorButton.tsx +49 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorTypes.ts +9 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx +62 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +128 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx +45 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarNodes.tsx +59 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +23 -9
- data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +192 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_default.jsx +36 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_star_rating/{_star_rating.jsx → _star_rating.tsx} +18 -22
- data/app/pb_kits/playbook/pb_star_rating/star_rating.test.js +71 -0
- data/app/pb_kits/playbook/pb_table/{_table.jsx → _table.tsx} +9 -11
- data/app/pb_kits/playbook/pb_table/{_table_row.jsx → _table_row.tsx} +7 -8
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb +41 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx +62 -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/{index.js → index.ts} +4 -4
- data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +129 -0
- data/app/pb_kits/playbook/pb_textarea/{index.js → index.tsx} +2 -0
- data/app/pb_kits/playbook/pb_textarea/textarea.test.js +213 -0
- data/app/pb_kits/playbook/tokens/_colors.scss +16 -1
- data/app/pb_kits/playbook/utilities/_cursor.scss +141 -1
- data/app/pb_kits/playbook/utilities/globalProps.ts +5 -2
- data/lib/playbook/cursor.rb +2 -2
- data/lib/playbook/version.rb +2 -2
- metadata +25 -14
- data/app/pb_kits/playbook/pb_flex/_flex_item.jsx +0 -41
- data/app/pb_kits/playbook/pb_textarea/_textarea.jsx +0 -135
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: 12.
|
4
|
+
version: 12.16.0.pre.alpha.tiptaptestingpart1528
|
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-04-
|
12
|
+
date: 2023-04-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -979,7 +979,6 @@ files:
|
|
979
979
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js
|
980
980
|
- app/pb_kits/playbook/pb_flex/_flex.scss
|
981
981
|
- app/pb_kits/playbook/pb_flex/_flex.tsx
|
982
|
-
- app/pb_kits/playbook/pb_flex/_flex_item.jsx
|
983
982
|
- app/pb_kits/playbook/pb_flex/_flex_item.scss
|
984
983
|
- app/pb_kits/playbook/pb_flex/_flex_item.tsx
|
985
984
|
- app/pb_kits/playbook/pb_flex/docs/_description.md
|
@@ -1718,9 +1717,17 @@ files:
|
|
1718
1717
|
- app/pb_kits/playbook/pb_radio/radio.html.erb
|
1719
1718
|
- app/pb_kits/playbook/pb_radio/radio.rb
|
1720
1719
|
- app/pb_kits/playbook/pb_radio/radio.test.js
|
1720
|
+
- app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorButton.tsx
|
1721
|
+
- app/pb_kits/playbook/pb_rich_text_editor/TipTap/EditorTypes.ts
|
1722
|
+
- app/pb_kits/playbook/pb_rich_text_editor/TipTap/Toolbar.tsx
|
1723
|
+
- app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx
|
1724
|
+
- app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
|
1725
|
+
- app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarNodes.tsx
|
1721
1726
|
- app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss
|
1722
1727
|
- app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx
|
1728
|
+
- app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss
|
1723
1729
|
- app/pb_kits/playbook/pb_rich_text_editor/_trix_styles.scss
|
1730
|
+
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_default.jsx
|
1724
1731
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_attributes.html.erb
|
1725
1732
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_attributes.jsx
|
1726
1733
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.html.erb
|
@@ -1873,8 +1880,8 @@ files:
|
|
1873
1880
|
- app/pb_kits/playbook/pb_source/source.html.erb
|
1874
1881
|
- app/pb_kits/playbook/pb_source/source.rb
|
1875
1882
|
- app/pb_kits/playbook/pb_source/source.test.js
|
1876
|
-
- app/pb_kits/playbook/pb_star_rating/_star_rating.jsx
|
1877
1883
|
- app/pb_kits/playbook/pb_star_rating/_star_rating.scss
|
1884
|
+
- app/pb_kits/playbook/pb_star_rating/_star_rating.tsx
|
1878
1885
|
- app/pb_kits/playbook/pb_star_rating/docs/_description.md
|
1879
1886
|
- app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.html.erb
|
1880
1887
|
- app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.jsx
|
@@ -1884,6 +1891,7 @@ files:
|
|
1884
1891
|
- app/pb_kits/playbook/pb_star_rating/docs/index.js
|
1885
1892
|
- app/pb_kits/playbook/pb_star_rating/star_rating.html.erb
|
1886
1893
|
- app/pb_kits/playbook/pb_star_rating/star_rating.rb
|
1894
|
+
- app/pb_kits/playbook/pb_star_rating/star_rating.test.js
|
1887
1895
|
- app/pb_kits/playbook/pb_stat_change/_stat_change.scss
|
1888
1896
|
- app/pb_kits/playbook/pb_stat_change/_stat_change.tsx
|
1889
1897
|
- app/pb_kits/playbook/pb_stat_change/docs/_description.md
|
@@ -1915,9 +1923,9 @@ files:
|
|
1915
1923
|
- app/pb_kits/playbook/pb_stat_value/stat_value.html.erb
|
1916
1924
|
- app/pb_kits/playbook/pb_stat_value/stat_value.rb
|
1917
1925
|
- app/pb_kits/playbook/pb_stat_value/stat_value.test.js
|
1918
|
-
- app/pb_kits/playbook/pb_table/_table.jsx
|
1919
1926
|
- app/pb_kits/playbook/pb_table/_table.scss
|
1920
|
-
- app/pb_kits/playbook/pb_table/
|
1927
|
+
- app/pb_kits/playbook/pb_table/_table.tsx
|
1928
|
+
- app/pb_kits/playbook/pb_table/_table_row.tsx
|
1921
1929
|
- app/pb_kits/playbook/pb_table/docs/_description.md
|
1922
1930
|
- app/pb_kits/playbook/pb_table/docs/_table_action_middle.html.erb
|
1923
1931
|
- app/pb_kits/playbook/pb_table/docs/_table_action_middle.jsx
|
@@ -1972,9 +1980,11 @@ files:
|
|
1972
1980
|
- app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.html.erb
|
1973
1981
|
- app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.jsx
|
1974
1982
|
- app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.md
|
1983
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb
|
1984
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx
|
1975
1985
|
- app/pb_kits/playbook/pb_table/docs/example.yml
|
1976
1986
|
- app/pb_kits/playbook/pb_table/docs/index.js
|
1977
|
-
- app/pb_kits/playbook/pb_table/index.
|
1987
|
+
- app/pb_kits/playbook/pb_table/index.ts
|
1978
1988
|
- app/pb_kits/playbook/pb_table/styles/_alignment.scss
|
1979
1989
|
- app/pb_kits/playbook/pb_table/styles/_all.scss
|
1980
1990
|
- app/pb_kits/playbook/pb_table/styles/_content.scss
|
@@ -2023,8 +2033,8 @@ files:
|
|
2023
2033
|
- app/pb_kits/playbook/pb_text_input/text_input.html.erb
|
2024
2034
|
- app/pb_kits/playbook/pb_text_input/text_input.rb
|
2025
2035
|
- app/pb_kits/playbook/pb_text_input/text_input.test.js
|
2026
|
-
- app/pb_kits/playbook/pb_textarea/_textarea.jsx
|
2027
2036
|
- app/pb_kits/playbook/pb_textarea/_textarea.scss
|
2037
|
+
- app/pb_kits/playbook/pb_textarea/_textarea.tsx
|
2028
2038
|
- app/pb_kits/playbook/pb_textarea/_textarea_mixin.scss
|
2029
2039
|
- app/pb_kits/playbook/pb_textarea/docs/_description.md
|
2030
2040
|
- app/pb_kits/playbook/pb_textarea/docs/_footer.md
|
@@ -2043,9 +2053,10 @@ files:
|
|
2043
2053
|
- app/pb_kits/playbook/pb_textarea/docs/_textarea_resize.jsx
|
2044
2054
|
- app/pb_kits/playbook/pb_textarea/docs/example.yml
|
2045
2055
|
- app/pb_kits/playbook/pb_textarea/docs/index.js
|
2046
|
-
- app/pb_kits/playbook/pb_textarea/index.
|
2056
|
+
- app/pb_kits/playbook/pb_textarea/index.tsx
|
2047
2057
|
- app/pb_kits/playbook/pb_textarea/textarea.html.erb
|
2048
2058
|
- app/pb_kits/playbook/pb_textarea/textarea.rb
|
2059
|
+
- app/pb_kits/playbook/pb_textarea/textarea.test.js
|
2049
2060
|
- app/pb_kits/playbook/pb_time/_time.scss
|
2050
2061
|
- app/pb_kits/playbook/pb_time/_time.tsx
|
2051
2062
|
- app/pb_kits/playbook/pb_time/docs/_description.md
|
@@ -2465,7 +2476,7 @@ homepage: http://playbook.powerapp.cloud
|
|
2465
2476
|
licenses:
|
2466
2477
|
- ISC
|
2467
2478
|
metadata: {}
|
2468
|
-
post_install_message:
|
2479
|
+
post_install_message:
|
2469
2480
|
rdoc_options: []
|
2470
2481
|
require_paths:
|
2471
2482
|
- lib
|
@@ -2476,12 +2487,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2476
2487
|
version: '0'
|
2477
2488
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2478
2489
|
requirements:
|
2479
|
-
- - "
|
2490
|
+
- - ">"
|
2480
2491
|
- !ruby/object:Gem::Version
|
2481
|
-
version:
|
2492
|
+
version: 1.3.1
|
2482
2493
|
requirements: []
|
2483
2494
|
rubygems_version: 3.3.7
|
2484
|
-
signing_key:
|
2495
|
+
signing_key:
|
2485
2496
|
specification_version: 4
|
2486
2497
|
summary: Playbook Design System
|
2487
2498
|
test_files: []
|
@@ -1,41 +0,0 @@
|
|
1
|
-
/* @flow */
|
2
|
-
import React from 'react'
|
3
|
-
import classnames from 'classnames'
|
4
|
-
import { buildCss } from '../utilities/props'
|
5
|
-
import { globalProps } from '../utilities/globalProps'
|
6
|
-
type FlexItemPropTypes = {
|
7
|
-
children: array<React.ReactNode> | React.ReactNode,
|
8
|
-
fixedSize: string,
|
9
|
-
grow: boolean,
|
10
|
-
shrink: boolean,
|
11
|
-
flex: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'none',
|
12
|
-
className: string,
|
13
|
-
overflow?: "auto" | "hidden" | "initial" | "inherit" | "scroll" | "visible",
|
14
|
-
order?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'first' | 'none',
|
15
|
-
alignSelf?: "start" | "end" | "center" | "stretch",
|
16
|
-
displayFlex: boolean
|
17
|
-
}
|
18
|
-
|
19
|
-
const FlexItem = (props: FlexItemPropTypes) => {
|
20
|
-
const { children, className, fixedSize, grow, overflow = null, shrink, flex = 'none', order = 'none', alignSelf = null, displayFlex } = props
|
21
|
-
const growClass = grow === true ? 'grow' : ''
|
22
|
-
const displayFlexClass = displayFlex === true ? `display_flex_${displayFlex}` : ''
|
23
|
-
const flexClass = flex !== 'none' ? `flex_${flex}` : ''
|
24
|
-
const overflowClass = overflow ? `overflow_${overflow}` : ''
|
25
|
-
const shrinkClass = shrink === true ? 'shrink' : ''
|
26
|
-
const alignSelfClass = alignSelf ? `align_self_${alignSelf}` : ''
|
27
|
-
const fixedStyle =
|
28
|
-
fixedSize !== undefined ? { flexBasis: `${fixedSize}` } : null
|
29
|
-
const orderClass = order !== 'none' ? `order_${order}` : null
|
30
|
-
|
31
|
-
return (
|
32
|
-
<div
|
33
|
-
className={classnames(buildCss('pb_flex_item_kit', growClass, shrinkClass, flexClass, displayFlexClass), overflowClass, orderClass, alignSelfClass, globalProps(props), className)}
|
34
|
-
style={fixedStyle}
|
35
|
-
>
|
36
|
-
{children}
|
37
|
-
</div>
|
38
|
-
)
|
39
|
-
}
|
40
|
-
|
41
|
-
export default FlexItem
|
@@ -1,135 +0,0 @@
|
|
1
|
-
/* @flow */
|
2
|
-
/* eslint-disable react-hooks/rules-of-hooks */
|
3
|
-
|
4
|
-
import React, { forwardRef, useEffect, useRef } from 'react'
|
5
|
-
import classnames from 'classnames'
|
6
|
-
|
7
|
-
import PbTextarea from './'
|
8
|
-
import type { InputCallback } from '../types.js'
|
9
|
-
|
10
|
-
import { globalProps } from '../utilities/globalProps'
|
11
|
-
|
12
|
-
import Body from '../pb_body/_body'
|
13
|
-
import Caption from '../pb_caption/_caption'
|
14
|
-
import Flex from '../pb_flex/_flex'
|
15
|
-
import FlexItem from '../pb_flex/_flex_item'
|
16
|
-
|
17
|
-
type TextareaProps = {
|
18
|
-
characterCount?: string,
|
19
|
-
className?: string,
|
20
|
-
children?: array<React.ReactChild>,
|
21
|
-
disabled?: boolean,
|
22
|
-
error?: string,
|
23
|
-
id?: string,
|
24
|
-
inline?: boolean,
|
25
|
-
object?: string,
|
26
|
-
method?: string,
|
27
|
-
label?: string,
|
28
|
-
maxCharacters?: string,
|
29
|
-
placeholder?: string,
|
30
|
-
value?: string,
|
31
|
-
name?: string,
|
32
|
-
required?: boolean,
|
33
|
-
rows?: number,
|
34
|
-
resize: 'none' | 'both' | 'horizontal' | 'vertical' | 'auto',
|
35
|
-
onChange?: InputCallback<HTMLTextAreaElement>,
|
36
|
-
}
|
37
|
-
|
38
|
-
const Textarea = ({
|
39
|
-
characterCount,
|
40
|
-
className,
|
41
|
-
children,
|
42
|
-
disabled,
|
43
|
-
inline = false,
|
44
|
-
resize = 'none',
|
45
|
-
error,
|
46
|
-
label,
|
47
|
-
maxCharacters,
|
48
|
-
name,
|
49
|
-
onChange = () => {},
|
50
|
-
placeholder,
|
51
|
-
required,
|
52
|
-
rows = 4,
|
53
|
-
value,
|
54
|
-
...props
|
55
|
-
}: TextareaProps, ref: React.ElementRef<"textarea">) => {
|
56
|
-
ref = ref || useRef(false)
|
57
|
-
useEffect(() => {
|
58
|
-
if (ref.current && resize === 'auto') {
|
59
|
-
PbTextarea.addMatch(ref.current)
|
60
|
-
}
|
61
|
-
})
|
62
|
-
|
63
|
-
const errorClass = error ? 'error' : null
|
64
|
-
const inlineClass = inline ? 'inline' : ''
|
65
|
-
const resizeClass = `resize_${resize}`
|
66
|
-
const classes = classnames('pb_textarea_kit', errorClass, inlineClass, resizeClass, globalProps(props), className)
|
67
|
-
|
68
|
-
const characterCounter = () => {
|
69
|
-
return maxCharacters && characterCount ? `${checkIfZero(characterCount)} / ${maxCharacters}` : checkIfZero(characterCount)
|
70
|
-
}
|
71
|
-
|
72
|
-
const checkIfZero = (characterCount) => {
|
73
|
-
return characterCount == 0 ? characterCount.toString() : characterCount
|
74
|
-
}
|
75
|
-
|
76
|
-
return (
|
77
|
-
<div className={classes}>
|
78
|
-
<Caption
|
79
|
-
text={label}
|
80
|
-
/>
|
81
|
-
<If condition={children}>
|
82
|
-
{children}
|
83
|
-
<Else />
|
84
|
-
<textarea
|
85
|
-
className="pb_textarea_kit"
|
86
|
-
disabled={disabled}
|
87
|
-
name={name}
|
88
|
-
onChange={onChange}
|
89
|
-
placeholder={placeholder}
|
90
|
-
ref={ref}
|
91
|
-
required={required}
|
92
|
-
rows={rows}
|
93
|
-
value={value}
|
94
|
-
{...props}
|
95
|
-
/>
|
96
|
-
<If condition={error}>
|
97
|
-
<If condition={characterCount}>
|
98
|
-
<Flex
|
99
|
-
spacing="between"
|
100
|
-
vertical="center"
|
101
|
-
>
|
102
|
-
<FlexItem>
|
103
|
-
<Body
|
104
|
-
margin="none"
|
105
|
-
status="negative"
|
106
|
-
text={error}
|
107
|
-
/>
|
108
|
-
</FlexItem>
|
109
|
-
<FlexItem>
|
110
|
-
<Caption
|
111
|
-
margin="none"
|
112
|
-
size="xs"
|
113
|
-
text={characterCounter()}
|
114
|
-
/>
|
115
|
-
</FlexItem>
|
116
|
-
</Flex>
|
117
|
-
<Else />
|
118
|
-
<Body
|
119
|
-
status="negative"
|
120
|
-
text={error}
|
121
|
-
/>
|
122
|
-
</If>
|
123
|
-
<Else />
|
124
|
-
<Caption
|
125
|
-
margin="none"
|
126
|
-
size="xs"
|
127
|
-
text={characterCounter()}
|
128
|
-
/>
|
129
|
-
</If>
|
130
|
-
</If>
|
131
|
-
</div>
|
132
|
-
)
|
133
|
-
}
|
134
|
-
|
135
|
-
export default forwardRef(Textarea)
|