playbook_ui 8.3.0.deps2 → 8.3.0.pre.alpha1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +18 -1
- data/app/pb_kits/playbook/data/menu.yml +2 -3
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +62 -16
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.jsx +2 -1
- data/app/pb_kits/playbook/pb_select/_select.scss +14 -5
- data/app/pb_kits/playbook/pb_select/docs/_select_custom_select.jsx +4 -1
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +1 -1
- data/app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_input.jsx +145 -135
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +18 -6
- data/app/pb_kits/playbook/pb_textarea/_textarea.scss +34 -18
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_character_counter.jsx +5 -1
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_custom.jsx +4 -2
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +21 -3
- data/lib/playbook/version.rb +1 -2
- metadata +36 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce6fc42c5e35b98e211b6039d6cfe3f638ceffb3a108b1491b91109202b2f111
|
4
|
+
data.tar.gz: 4f9bc62b51a8e6c8a72f8d5351645e8bd9a06447c3f8806b0f2bd22c587d02e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50867043ffa155cfed91f6a84b349de9da8ab9ed05848feda20b2a198895376e0c3b11f98386a729d6b7016c2a369cf99b441bb08cca6441ad8600b5cd9da7c0
|
7
|
+
data.tar.gz: a8711b9503e9aa150fb5edf7c588a13a986a39e91aa92cbd6a65fbc0e1165632dd323433dc6dca2ea425d19e261e71a51febde3a2ea8fe04ea3f3b7af2ff227f
|
data/Rakefile
CHANGED
@@ -4,12 +4,29 @@ rescue LoadError
|
|
4
4
|
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
5
|
end
|
6
6
|
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'Playbook'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.md')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
7
17
|
APP_RAKEFILE = File.expand_path("spec/dummy/Rakefile", __dir__)
|
8
18
|
load 'rails/tasks/engine.rake'
|
19
|
+
|
9
20
|
load 'rails/tasks/statistics.rake'
|
10
21
|
|
11
22
|
require 'bundler/gem_tasks'
|
12
23
|
|
13
|
-
|
24
|
+
require 'rake/testtask'
|
25
|
+
|
26
|
+
Rake::TestTask.new(:test) do |t|
|
27
|
+
t.libs << 'test'
|
28
|
+
t.pattern = 'spec/**/*_spec.rb'
|
29
|
+
t.verbose = false
|
30
|
+
end
|
14
31
|
|
15
32
|
task default: :test
|
@@ -7,7 +7,6 @@ kits:
|
|
7
7
|
- button_toolbar
|
8
8
|
- circle_icon_button
|
9
9
|
- card
|
10
|
-
- checkbox
|
11
10
|
- collapsible
|
12
11
|
- charts_and_graphs:
|
13
12
|
- bar_graph
|
@@ -21,12 +20,14 @@ kits:
|
|
21
20
|
- fixed_confirmation_toast
|
22
21
|
- flex
|
23
22
|
- forms:
|
23
|
+
- checkbox
|
24
24
|
- date_picker
|
25
25
|
- file_upload
|
26
26
|
- form
|
27
27
|
- form_group
|
28
28
|
- form_pill
|
29
29
|
- radio
|
30
|
+
- rich_text_editor
|
30
31
|
- select
|
31
32
|
- selectable_card
|
32
33
|
- selectable_card_icon
|
@@ -57,7 +58,6 @@ kits:
|
|
57
58
|
- progress_pills
|
58
59
|
- progress_simple
|
59
60
|
- progress_step
|
60
|
-
- rich_text_editor
|
61
61
|
- section_separator
|
62
62
|
- source
|
63
63
|
- star_rating
|
@@ -96,4 +96,3 @@ kits:
|
|
96
96
|
- weekday_stacked
|
97
97
|
- user
|
98
98
|
- user_badge
|
99
|
-
|
@@ -9,6 +9,7 @@
|
|
9
9
|
@import "./trix_styles";
|
10
10
|
|
11
11
|
|
12
|
+
|
12
13
|
.trix-content pre {
|
13
14
|
display: inline-block;
|
14
15
|
width: 100%;
|
@@ -25,9 +26,6 @@
|
|
25
26
|
|
26
27
|
[class^=pb_rich_text_editor_kit] {
|
27
28
|
|
28
|
-
|
29
|
-
|
30
|
-
// trix-toolbar { display: none; }
|
31
29
|
// Disables File Attatchment Button in Toolbar
|
32
30
|
trix-toolbar [data-trix-button-group="file-tools"] {
|
33
31
|
display: none;
|
@@ -64,6 +62,19 @@
|
|
64
62
|
border-top-right-radius: $border_rad_heavier !important;
|
65
63
|
}
|
66
64
|
}
|
65
|
+
&:focus-within{
|
66
|
+
.trix-button-row, trix-editor {
|
67
|
+
background-color: $focus_input_light;
|
68
|
+
border-color: $primary;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
.trix-dialog.trix-dialog--link{
|
72
|
+
background-color: $white ;
|
73
|
+
border: 1px solid $border_light;
|
74
|
+
box-shadow: none;
|
75
|
+
margin-top: $space_sm;
|
76
|
+
margin-left: $space_sm;
|
77
|
+
}
|
67
78
|
|
68
79
|
&.sticky {
|
69
80
|
trix-toolbar {
|
@@ -87,7 +98,7 @@
|
|
87
98
|
height: $space_lg;
|
88
99
|
width: $space_lg;
|
89
100
|
margin: $space_xs / 2;
|
90
|
-
border-radius: $
|
101
|
+
border-radius: $border_rad_heavier;
|
91
102
|
&::before {
|
92
103
|
background-size: auto;
|
93
104
|
}
|
@@ -113,6 +124,12 @@
|
|
113
124
|
}
|
114
125
|
}
|
115
126
|
}
|
127
|
+
|
128
|
+
button.trix-button.trix-button--icon.trix-button{
|
129
|
+
&:hover{
|
130
|
+
background-color: rgba($border_light, 0.50);
|
131
|
+
}
|
132
|
+
}
|
116
133
|
}
|
117
134
|
|
118
135
|
|
@@ -121,6 +138,7 @@
|
|
121
138
|
// https://github.com/basecamp/trix/issues/464#issuecomment-564683997
|
122
139
|
|
123
140
|
&[class*=dark] {
|
141
|
+
|
124
142
|
// Dark SVG Icon Styles
|
125
143
|
.trix-button--icon-bold::before {
|
126
144
|
background-image: url("data:image/svg+xml,%3Csvg width='11px' height='14px' viewBox='0 0 11 14' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg id='Symbols' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd' fill-opacity='0.6'%3E%3Cg id='Rich-Text/Dark/Field-Only/Empty' transform='translate(-19.000000, -17.000000)' fill='%23FFFFFF' fill-rule='nonzero'%3E%3Cg id='Styling1' transform='translate(7.000000, 7.000000)'%3E%3Cpath d='M20.6,16.79 C21.565,16.115 22.25,15.025 22.25,14 C22.25,11.745 20.505,10 18.25,10 L12,10 L12,24 L19.04,24 C21.135,24 22.75,22.3 22.75,20.21 C22.75,18.69 21.885,17.395 20.6,16.79 Z M15,12.5 L18,12.5 C18.83,12.5 19.5,13.17 19.5,14 C19.5,14.83 18.83,15.5 18,15.5 L15,15.5 L15,12.5 L15,12.5 Z M18.5,21.5 L15,21.5 L15,18.5 L18.5,18.5 C19.33,18.5 20,19.17 20,20 C20,20.83 19.33,21.5 18.5,21.5 Z' id='Shape'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
|
@@ -183,34 +201,62 @@
|
|
183
201
|
|
184
202
|
// Dark Mode Placeholder
|
185
203
|
trix-editor:empty:not(:focus)::before {
|
186
|
-
color: $
|
204
|
+
color: $focus_input_dark;
|
187
205
|
}
|
188
206
|
|
189
207
|
trix-editor {
|
190
|
-
|
191
|
-
|
208
|
+
background-color: rgba($white, 0.1);
|
209
|
+
border-color: rgba($white, 0.15);
|
192
210
|
border-top-left-radius: 0;
|
193
211
|
border-top-right-radius: 0;
|
212
|
+
color: $text_dk_default;
|
194
213
|
}
|
195
214
|
|
196
215
|
trix-toolbar {
|
197
216
|
.trix-button-row {
|
198
|
-
background:
|
199
|
-
border: 1px solid rgba(
|
217
|
+
background-color: rgba($white, 0.1);
|
218
|
+
border: 1px solid rgba($white, 0.15);
|
219
|
+
border-bottom: 0;
|
220
|
+
}
|
221
|
+
.trix-active{
|
222
|
+
background: $active_dark !important;
|
223
|
+
}
|
224
|
+
button.trix-button.trix-button--icon.trix-button{
|
225
|
+
&:hover{
|
226
|
+
background-color: rgba($white, 0.15);
|
227
|
+
}
|
228
|
+
&:focus{
|
229
|
+
background-color: $active_dark !important;
|
230
|
+
}
|
231
|
+
}
|
232
|
+
&:focus{
|
233
|
+
border-color:$active_dark;
|
200
234
|
}
|
201
|
-
}
|
202
235
|
|
203
|
-
|
204
|
-
|
236
|
+
}
|
237
|
+
|
238
|
+
&:focus-within{
|
239
|
+
.trix-button-row, trix-editor {
|
240
|
+
background-color: rgba($white, 0.03);
|
241
|
+
border-color: $active_dark !important;
|
242
|
+
}
|
205
243
|
}
|
206
244
|
|
207
245
|
&.error {
|
208
|
-
|
246
|
+
trix-editor {
|
209
247
|
border-color: $error_dark;
|
210
248
|
}
|
211
249
|
}
|
250
|
+
|
251
|
+
.trix-dialog.trix-dialog--link.trix-active{
|
252
|
+
background-color: tint($bg_dark, 10%) !important;
|
253
|
+
border: 1px solid rgba($white, 0.1);
|
254
|
+
box-shadow: none;
|
255
|
+
margin-top: $space_sm;
|
256
|
+
margin-left: $space_sm;
|
257
|
+
}
|
258
|
+
.trix-button--dialog{
|
259
|
+
color: $white;
|
260
|
+
}
|
212
261
|
}
|
213
262
|
}
|
214
|
-
|
215
|
-
|
216
|
-
|
@@ -5,7 +5,7 @@ import {
|
|
5
5
|
RichTextEditor,
|
6
6
|
} from '../../'
|
7
7
|
|
8
|
-
const RichTextEditorPreview = () => {
|
8
|
+
const RichTextEditorPreview = (props) => {
|
9
9
|
const [showPreview, setShowPreview] = useState(false)
|
10
10
|
const [previewText, setPreviewText] = useState(<div />)
|
11
11
|
|
@@ -19,6 +19,7 @@ const RichTextEditorPreview = () => {
|
|
19
19
|
<RichTextEditor
|
20
20
|
id="content-preview-editor"
|
21
21
|
onChange={handleChange}
|
22
|
+
{...props}
|
22
23
|
/>
|
23
24
|
<If condition={showPreview}>
|
24
25
|
<Card marginTop="md">
|
@@ -7,7 +7,9 @@
|
|
7
7
|
margin-bottom: $space_sm;
|
8
8
|
select {
|
9
9
|
@include pb_textarea_light;
|
10
|
-
@include
|
10
|
+
@include pb_body_light;
|
11
|
+
background: none;
|
12
|
+
background-color: $white;
|
11
13
|
appearance: none;
|
12
14
|
cursor: pointer;
|
13
15
|
box-shadow: inset 0 -11px 20px rgba($primary, 0.05);
|
@@ -22,6 +24,9 @@
|
|
22
24
|
background-color: $focus_input_light;
|
23
25
|
}
|
24
26
|
}
|
27
|
+
&:focus{
|
28
|
+
border-color: $primary;
|
29
|
+
}
|
25
30
|
&:disabled ~ .pb_select_kit_caret {
|
26
31
|
opacity: 0.5;
|
27
32
|
}
|
@@ -61,9 +66,10 @@
|
|
61
66
|
&.dark {
|
62
67
|
select {
|
63
68
|
@include pb_textarea_dark;
|
64
|
-
@include
|
65
|
-
|
66
|
-
|
69
|
+
@include pb_body_light_dark;
|
70
|
+
background: none;
|
71
|
+
|
72
|
+
background-color: rgba($white,.10);
|
67
73
|
box-shadow: inset 0 -11px 20px rgba($white, 0.05);
|
68
74
|
text-shadow: 0 0 0 $text_dk_default;
|
69
75
|
padding-right: $space_xl;
|
@@ -72,9 +78,12 @@
|
|
72
78
|
text-overflow: ellipsis;
|
73
79
|
@media (hover:hover) {
|
74
80
|
&:hover, &:active, &:focus {
|
75
|
-
background-color:
|
81
|
+
background-color: rgba($white,.05);
|
76
82
|
}
|
77
83
|
}
|
84
|
+
&:focus{
|
85
|
+
border-color: $active_dark;
|
86
|
+
}
|
78
87
|
}
|
79
88
|
.pb_select_kit_caret {
|
80
89
|
color: $white;
|
@@ -1,158 +1,168 @@
|
|
1
|
-
import React from 'react'
|
1
|
+
import React, { useState } from 'react'
|
2
2
|
import {
|
3
3
|
Body,
|
4
4
|
SelectableCard,
|
5
5
|
Title,
|
6
6
|
} from '../../'
|
7
7
|
|
8
|
-
|
9
|
-
state = {
|
8
|
+
const SelectableCardInput = (props) => {
|
9
|
+
const [state, setState] = useState({
|
10
10
|
firstCheckbox: true,
|
11
11
|
secondCheckbox: true,
|
12
12
|
thirdCheckbox: false,
|
13
13
|
forthCheckbox: false,
|
14
14
|
radioSelected: 'first',
|
15
|
-
}
|
15
|
+
})
|
16
16
|
|
17
|
-
handleSelect = (event) => {
|
18
|
-
|
17
|
+
const handleSelect = (event) => {
|
18
|
+
setState({ ...state,
|
19
19
|
[event.target.name]: event.target.checked,
|
20
20
|
})
|
21
21
|
}
|
22
22
|
|
23
|
-
handleRadioSelect = (event) => {
|
24
|
-
|
23
|
+
const handleRadioSelect = (event) => {
|
24
|
+
setState({
|
25
|
+
...state,
|
25
26
|
radioSelected: event.target.value,
|
26
27
|
})
|
27
28
|
}
|
28
29
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
</
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
<
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
30
|
+
return (
|
31
|
+
<>
|
32
|
+
<Title
|
33
|
+
size={3}
|
34
|
+
text="What programming languages do you know?"
|
35
|
+
{...props}
|
36
|
+
/>
|
37
|
+
|
38
|
+
<br />
|
39
|
+
|
40
|
+
<SelectableCard
|
41
|
+
checked={state.firstCheckbox}
|
42
|
+
inputId="firstCheckbox"
|
43
|
+
name="firstCheckbox"
|
44
|
+
onChange={handleSelect}
|
45
|
+
value="firstCheckbox"
|
46
|
+
variant="displayInput"
|
47
|
+
{...props}
|
48
|
+
>
|
49
|
+
<Body {...props}>{'Ruby'}</Body>
|
50
|
+
</SelectableCard>
|
51
|
+
|
52
|
+
<SelectableCard
|
53
|
+
checked={state.secondCheckbox}
|
54
|
+
inputId="secondCheckbox"
|
55
|
+
name="secondCheckbox"
|
56
|
+
onChange={handleSelect}
|
57
|
+
value="secondCheckbox"
|
58
|
+
variant="displayInput"
|
59
|
+
{...props}
|
60
|
+
>
|
61
|
+
<Body {...props}>{'JavaScript'}</Body>
|
62
|
+
</SelectableCard>
|
63
|
+
|
64
|
+
<SelectableCard
|
65
|
+
checked={state.thirdCheckbox}
|
66
|
+
inputId="thirdCheckbox"
|
67
|
+
name="thirdCheckbox"
|
68
|
+
onChange={handleSelect}
|
69
|
+
value="thirdCheckbox"
|
70
|
+
variant="displayInput"
|
71
|
+
{...props}
|
72
|
+
>
|
73
|
+
<Body {...props}>{'TypeScript'}</Body>
|
74
|
+
</SelectableCard>
|
75
|
+
|
76
|
+
<SelectableCard
|
77
|
+
checked={state.fourthCheckbox}
|
78
|
+
inputId="fourthCheckbox"
|
79
|
+
name="fourthCheckbox"
|
80
|
+
onChange={handleSelect}
|
81
|
+
value="fourthCheckbox"
|
82
|
+
variant="displayInput"
|
83
|
+
{...props}
|
84
|
+
>
|
85
|
+
<Body {...props}>{'Swift'}</Body>
|
86
|
+
</SelectableCard>
|
87
|
+
|
88
|
+
<br />
|
89
|
+
|
90
|
+
<Title
|
91
|
+
size={3}
|
92
|
+
text="How likely are you to recommend Playbook to a friend?"
|
93
|
+
{...props}
|
94
|
+
/>
|
95
|
+
|
96
|
+
<br />
|
97
|
+
|
98
|
+
<SelectableCard
|
99
|
+
checked={state.radioSelected === 'first'}
|
100
|
+
inputId="radio-1"
|
101
|
+
multi={false}
|
102
|
+
name="radio"
|
103
|
+
onChange={handleRadioSelect}
|
104
|
+
value="first"
|
105
|
+
variant="displayInput"
|
106
|
+
{...props}
|
107
|
+
>
|
108
|
+
<Body {...props}>{'5'}</Body>
|
109
|
+
</SelectableCard>
|
110
|
+
|
111
|
+
<SelectableCard
|
112
|
+
checked={state.radioSelected === 'second'}
|
113
|
+
inputId="radio-2"
|
114
|
+
multi={false}
|
115
|
+
name="radio"
|
116
|
+
onChange={handleRadioSelect}
|
117
|
+
value="second"
|
118
|
+
variant="displayInput"
|
119
|
+
{...props}
|
120
|
+
>
|
121
|
+
<Body {...props}>
|
122
|
+
{'4'}
|
123
|
+
</Body>
|
124
|
+
</SelectableCard>
|
125
|
+
|
126
|
+
<SelectableCard
|
127
|
+
checked={state.radioSelected === 'third'}
|
128
|
+
inputId="radio-3"
|
129
|
+
multi={false}
|
130
|
+
name="radio"
|
131
|
+
onChange={handleRadioSelect}
|
132
|
+
value="third"
|
133
|
+
variant="displayInput"
|
134
|
+
{...props}
|
135
|
+
>
|
136
|
+
<Body {...props}>{'3'}</Body>
|
137
|
+
</SelectableCard>
|
138
|
+
|
139
|
+
<SelectableCard
|
140
|
+
checked={state.radioSelected === 'fourth'}
|
141
|
+
inputId="radio-4"
|
142
|
+
multi={false}
|
143
|
+
name="radio"
|
144
|
+
onChange={handleRadioSelect}
|
145
|
+
value="fourth"
|
146
|
+
variant="displayInput"
|
147
|
+
{...props}
|
148
|
+
>
|
149
|
+
<Body {...props}>{'2'}</Body>
|
150
|
+
</SelectableCard>
|
151
|
+
|
152
|
+
<SelectableCard
|
153
|
+
checked={state.radioSelected === 'fifth'}
|
154
|
+
inputId="radio-5"
|
155
|
+
multi={false}
|
156
|
+
name="radio"
|
157
|
+
onChange={handleRadioSelect}
|
158
|
+
value="fifth"
|
159
|
+
variant="displayInput"
|
160
|
+
{...props}
|
161
|
+
>
|
162
|
+
<Body {...props}>{'1'}</Body>
|
163
|
+
</SelectableCard>
|
164
|
+
</>
|
165
|
+
)
|
156
166
|
}
|
157
167
|
|
158
168
|
export default SelectableCardInput
|
@@ -21,15 +21,20 @@
|
|
21
21
|
input,
|
22
22
|
.text_input {
|
23
23
|
@include pb_textarea_light;
|
24
|
-
@include pb_title_4;
|
25
24
|
overflow: hidden;
|
26
25
|
}
|
27
26
|
|
27
|
+
input:hover,
|
28
|
+
.text_input:hover{
|
29
|
+
background-color: rgba($focus_input_light,$opacity_5);
|
30
|
+
}
|
31
|
+
|
28
32
|
input:focus,
|
29
33
|
.text_input:focus,
|
30
34
|
input:-webkit-autofill:focus,
|
31
35
|
.text_input:-webkit-autofill:focus {
|
32
36
|
@include pb_textarea_focus;
|
37
|
+
border-color: $primary;
|
33
38
|
-webkit-box-shadow: 0 0 0px 1000px $focus_input_light inset;
|
34
39
|
transition: background-color 5000s ease-in-out 0s;
|
35
40
|
}
|
@@ -46,18 +51,25 @@
|
|
46
51
|
|
47
52
|
input, .text_input {
|
48
53
|
@include pb_textarea_dark;
|
49
|
-
@include
|
50
|
-
@include pb_title_dark;
|
54
|
+
@include pb_body_dark;
|
51
55
|
overflow: hidden;
|
56
|
+
background-color: rgba($white,$opacity_1);
|
57
|
+
border-color: rgba($white, 0.15);
|
58
|
+
}
|
59
|
+
|
60
|
+
input:hover,
|
61
|
+
.text_input:hover{
|
62
|
+
background-color: rgba($white, 0.15);
|
52
63
|
}
|
53
64
|
|
54
65
|
input:focus,
|
55
66
|
.text_input:focus,
|
56
67
|
input:-webkit-autofill:focus,
|
57
68
|
.text_input:-webkit-autofill:focus {
|
58
|
-
|
59
|
-
-
|
60
|
-
|
69
|
+
border-color: $active_dark;
|
70
|
+
background-color: rgba($white, 0.025);
|
71
|
+
-webkit-box-shadow: none;
|
72
|
+
|
61
73
|
}
|
62
74
|
}
|
63
75
|
|
@@ -5,28 +5,31 @@
|
|
5
5
|
|
6
6
|
[class^=pb_textarea_kit] {
|
7
7
|
margin-bottom: $space_sm;
|
8
|
+
|
8
9
|
[class^=pb_caption_kit] {
|
9
10
|
margin-bottom: $space_xs;
|
10
11
|
display: block;
|
11
12
|
}
|
12
|
-
textarea::placeholder
|
13
|
+
textarea::placeholder,
|
14
|
+
.pb_text_area_kit::placeholder {
|
13
15
|
@include pb_body_light;
|
14
16
|
}
|
15
|
-
|
17
|
+
textarea,
|
18
|
+
.pb_text_area_kit {
|
16
19
|
@include pb_textarea_light;
|
17
20
|
}
|
18
|
-
textarea:focus
|
21
|
+
textarea:focus,
|
22
|
+
.pb_text_area_kit:focus {
|
23
|
+
border-color: $primary;
|
19
24
|
@include pb_textarea_focus_light;
|
20
25
|
}
|
21
26
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
}
|
26
|
-
> textarea {
|
27
|
-
border-color: $error;
|
28
|
-
}
|
27
|
+
textarea:hover,
|
28
|
+
.pb_text_area_kit:hover {
|
29
|
+
background-color: rgba($focus_input_light,$opacity_5);
|
29
30
|
}
|
31
|
+
|
32
|
+
|
30
33
|
&.resize_both > textarea {
|
31
34
|
resize: both;
|
32
35
|
overflow: auto;
|
@@ -44,16 +47,29 @@
|
|
44
47
|
textarea::placeholder {
|
45
48
|
@include pb_body_light_dark;
|
46
49
|
}
|
47
|
-
|
48
|
-
|
50
|
+
textarea,
|
51
|
+
.pb_text_area_kit {
|
52
|
+
@include pb_body_dark;
|
53
|
+
background-color: rgba($white, $opacity_1);
|
54
|
+
border-color: rgba($white, 0.15);
|
49
55
|
}
|
50
|
-
textarea:focus {
|
51
|
-
|
56
|
+
textarea:focus, .pb_text_area_kit:focus {
|
57
|
+
border-color: $active_dark;
|
58
|
+
background-color: rgba($white, 0.025);
|
59
|
+
-webkit-box-shadow: none;
|
52
60
|
}
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
61
|
+
textarea:hover,
|
62
|
+
.pb_text_area_kit:hover {
|
63
|
+
background-color: rgba($white, 0.15);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
&.error {
|
68
|
+
[class*=pb_body_kit] {
|
69
|
+
margin-top: $space_xs / 2;
|
70
|
+
}
|
71
|
+
textarea {
|
72
|
+
border-color: $error;
|
57
73
|
}
|
58
74
|
}
|
59
75
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { useState } from 'react'
|
2
2
|
import { Textarea } from '../../'
|
3
3
|
|
4
|
-
const TextareaCharacterCounter = () => {
|
4
|
+
const TextareaCharacterCounter = (props) => {
|
5
5
|
const [value1, setValue1] = useState('Counting characters!')
|
6
6
|
const [value2, setValue2] = useState('This counter prevents the user from exceeding the maximum number of allowed characters. Just try it!')
|
7
7
|
const [value3, setValue3] = useState('This counter alerts the user that they have exceeded the maximum number of allowed characters.')
|
@@ -41,6 +41,7 @@ const TextareaCharacterCounter = () => {
|
|
41
41
|
label="Count Only"
|
42
42
|
onChange={(event) => setCount1(event.target.value.length)}
|
43
43
|
rows={4}
|
44
|
+
{...props}
|
44
45
|
/>
|
45
46
|
|
46
47
|
<br />
|
@@ -52,6 +53,7 @@ const TextareaCharacterCounter = () => {
|
|
52
53
|
onChange={() => handleMaxCount(event)}
|
53
54
|
rows={4}
|
54
55
|
value={value1}
|
56
|
+
{...props}
|
55
57
|
/>
|
56
58
|
|
57
59
|
<br />
|
@@ -63,6 +65,7 @@ const TextareaCharacterCounter = () => {
|
|
63
65
|
onChange={() => handleMaxCountWithBlocker(event, 100)}
|
64
66
|
rows={4}
|
65
67
|
value={value2}
|
68
|
+
{...props}
|
66
69
|
/>
|
67
70
|
|
68
71
|
<br />
|
@@ -75,6 +78,7 @@ const TextareaCharacterCounter = () => {
|
|
75
78
|
onChange={() => handleMaxCountWithError(event, 75)}
|
76
79
|
rows={4}
|
77
80
|
value={value3}
|
81
|
+
{...props}
|
78
82
|
/>
|
79
83
|
</>
|
80
84
|
)
|
@@ -4,12 +4,14 @@ import { Textarea } from '../../'
|
|
4
4
|
const TextareaCustom = (props) => {
|
5
5
|
return (
|
6
6
|
<div>
|
7
|
-
<Textarea
|
7
|
+
<Textarea
|
8
|
+
label="Label"
|
9
|
+
{...props}
|
10
|
+
>
|
8
11
|
<textarea
|
9
12
|
className="my_custom_class"
|
10
13
|
name="custom_textarea"
|
11
14
|
rows={4}
|
12
|
-
{...props}
|
13
15
|
>
|
14
16
|
{'Content goes here.'}
|
15
17
|
</textarea>
|
@@ -4,9 +4,23 @@
|
|
4
4
|
@import "../tokens/shadows";
|
5
5
|
|
6
6
|
[class^=pb_typeahead_kit] {
|
7
|
+
.typeahead-kit-select__option {
|
8
|
+
cursor: pointer;
|
9
|
+
}
|
7
10
|
.pb_typeahead_wrapper {
|
8
11
|
position: relative;
|
9
12
|
|
13
|
+
.text_input_value_container{
|
14
|
+
cursor: text;
|
15
|
+
}
|
16
|
+
.text_input_indicators,
|
17
|
+
.pb_list_kit{
|
18
|
+
cursor: pointer;
|
19
|
+
}
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
10
24
|
.pb_typeahead_loading_indicator {
|
11
25
|
position: absolute;
|
12
26
|
width: min-content;
|
@@ -97,8 +111,12 @@
|
|
97
111
|
color: $white;
|
98
112
|
}
|
99
113
|
.typeahead-kit-select__option:hover {
|
100
|
-
background-color:
|
114
|
+
background-color: $active_dark;
|
115
|
+
}
|
116
|
+
.typeahead-kit-select__indicator:hover{
|
117
|
+
color: $white;
|
101
118
|
}
|
119
|
+
|
102
120
|
.typeahead-kit-select__input {
|
103
121
|
color: white;
|
104
122
|
input:focus {
|
@@ -109,7 +127,7 @@
|
|
109
127
|
color: white;
|
110
128
|
}
|
111
129
|
.typeahead-kit-select__option--is-focused {
|
112
|
-
background-color:
|
130
|
+
background-color: $active_dark;
|
113
131
|
}
|
114
132
|
|
115
133
|
[class^=pb_list_kit] {
|
@@ -121,7 +139,7 @@
|
|
121
139
|
}
|
122
140
|
@media (hover:hover) {
|
123
141
|
&:hover {
|
124
|
-
background-color:
|
142
|
+
background-color: rgba($white,.1);
|
125
143
|
}
|
126
144
|
}
|
127
145
|
}
|
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: 8.3.0.
|
4
|
+
version: 8.3.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: 2021-03-
|
12
|
+
date: 2021-03-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -75,128 +75,128 @@ dependencies:
|
|
75
75
|
name: react-rails
|
76
76
|
requirement: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- -
|
78
|
+
- - '='
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version:
|
80
|
+
version: 2.6.0
|
81
81
|
type: :runtime
|
82
82
|
prerelease: false
|
83
83
|
version_requirements: !ruby/object:Gem::Requirement
|
84
84
|
requirements:
|
85
|
-
- -
|
85
|
+
- - '='
|
86
86
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
87
|
+
version: 2.6.0
|
88
88
|
- !ruby/object:Gem::Dependency
|
89
89
|
name: redcarpet
|
90
90
|
requirement: !ruby/object:Gem::Requirement
|
91
91
|
requirements:
|
92
|
-
- -
|
92
|
+
- - '='
|
93
93
|
- !ruby/object:Gem::Version
|
94
|
-
version:
|
94
|
+
version: 3.5.1
|
95
95
|
type: :runtime
|
96
96
|
prerelease: false
|
97
97
|
version_requirements: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
|
-
- -
|
99
|
+
- - '='
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version:
|
101
|
+
version: 3.5.1
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: rouge
|
104
104
|
requirement: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
|
-
- -
|
106
|
+
- - '='
|
107
107
|
- !ruby/object:Gem::Version
|
108
|
-
version:
|
108
|
+
version: 3.15.0
|
109
109
|
type: :runtime
|
110
110
|
prerelease: false
|
111
111
|
version_requirements: !ruby/object:Gem::Requirement
|
112
112
|
requirements:
|
113
|
-
- -
|
113
|
+
- - '='
|
114
114
|
- !ruby/object:Gem::Version
|
115
|
-
version:
|
115
|
+
version: 3.15.0
|
116
116
|
- !ruby/object:Gem::Dependency
|
117
117
|
name: sassc-rails
|
118
118
|
requirement: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
|
-
- -
|
120
|
+
- - '='
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version:
|
122
|
+
version: 1.3.0
|
123
123
|
type: :runtime
|
124
124
|
prerelease: false
|
125
125
|
version_requirements: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
|
-
- -
|
127
|
+
- - '='
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version:
|
129
|
+
version: 1.3.0
|
130
130
|
- !ruby/object:Gem::Dependency
|
131
131
|
name: slim-rails
|
132
132
|
requirement: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
|
-
- -
|
134
|
+
- - '='
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version:
|
136
|
+
version: 3.2.0
|
137
137
|
type: :runtime
|
138
138
|
prerelease: false
|
139
139
|
version_requirements: !ruby/object:Gem::Requirement
|
140
140
|
requirements:
|
141
|
-
- -
|
141
|
+
- - '='
|
142
142
|
- !ruby/object:Gem::Version
|
143
|
-
version:
|
143
|
+
version: 3.2.0
|
144
144
|
- !ruby/object:Gem::Dependency
|
145
145
|
name: sprockets-rails
|
146
146
|
requirement: !ruby/object:Gem::Requirement
|
147
147
|
requirements:
|
148
|
-
- -
|
148
|
+
- - '='
|
149
149
|
- !ruby/object:Gem::Version
|
150
|
-
version:
|
150
|
+
version: 2.3.3
|
151
151
|
type: :runtime
|
152
152
|
prerelease: false
|
153
153
|
version_requirements: !ruby/object:Gem::Requirement
|
154
154
|
requirements:
|
155
|
-
- -
|
155
|
+
- - '='
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
version:
|
157
|
+
version: 2.3.3
|
158
158
|
- !ruby/object:Gem::Dependency
|
159
159
|
name: view_component
|
160
160
|
requirement: !ruby/object:Gem::Requirement
|
161
161
|
requirements:
|
162
|
-
- -
|
162
|
+
- - '='
|
163
163
|
- !ruby/object:Gem::Version
|
164
|
-
version:
|
164
|
+
version: 2.23.2
|
165
165
|
type: :runtime
|
166
166
|
prerelease: false
|
167
167
|
version_requirements: !ruby/object:Gem::Requirement
|
168
168
|
requirements:
|
169
|
-
- -
|
169
|
+
- - '='
|
170
170
|
- !ruby/object:Gem::Version
|
171
|
-
version:
|
171
|
+
version: 2.23.2
|
172
172
|
- !ruby/object:Gem::Dependency
|
173
173
|
name: webpacker
|
174
174
|
requirement: !ruby/object:Gem::Requirement
|
175
175
|
requirements:
|
176
|
-
- -
|
176
|
+
- - '='
|
177
177
|
- !ruby/object:Gem::Version
|
178
|
-
version:
|
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:
|
185
|
+
version: 4.2.2
|
186
186
|
- !ruby/object:Gem::Dependency
|
187
187
|
name: webpacker-react
|
188
188
|
requirement: !ruby/object:Gem::Requirement
|
189
189
|
requirements:
|
190
190
|
- - "~>"
|
191
191
|
- !ruby/object:Gem::Version
|
192
|
-
version:
|
192
|
+
version: 0.3.2
|
193
193
|
type: :runtime
|
194
194
|
prerelease: false
|
195
195
|
version_requirements: !ruby/object:Gem::Requirement
|
196
196
|
requirements:
|
197
197
|
- - "~>"
|
198
198
|
- !ruby/object:Gem::Version
|
199
|
-
version:
|
199
|
+
version: 0.3.2
|
200
200
|
- !ruby/object:Gem::Dependency
|
201
201
|
name: better_errors
|
202
202
|
requirement: !ruby/object:Gem::Requirement
|